Time calculation

Results 1 to 4 of 4

Thread: Time calculation

  1. #1
    SuzyLousy Guest

    Default Time calculation

    Does anybody know how to add two time together.<BR>e.g<BR><BR>11.00 am + 10 minutes = 11.10

  2. #2
    ghreddy Guest

    Default RE: Time calculation

    use dateadd function of visualbasic scripting..for example<BR><BR>&#060;%<BR>dim NewDate,t1<BR>t1=cdate("11.00AM")<BR>NewDate = DateAdd("n", cdate("10"), t1)<BR>Response.Write NewDate<BR>%&#062;<BR><BR><BR>

  3. #3
    BalletChick Guest

    Default RE: Time calculation

    That&#039s close...<BR><BR>The second parameter of the DateAdd runction should be a number, not a date. You are forcing two unnecessary type conversions and risking an unknown unit conversion (e.g. what is cdate(10) equivalent to? is that 10 seconds? 10 minutes? etc.)<BR><BR>So... should be:<BR><BR> NewDate = DateAdd("n", 10, t1)<BR><BR>

  4. #4
    Join Date
    Dec 1969

    Default Popular topic lately! (nfm)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts