Subtracting Times

Results 1 to 2 of 2

Thread: Subtracting Times

  1. #1
    K. Zig Guest

    Default Subtracting Times

    I have an application that extracts two times from a database and stuffs these values into variables. I want to be able to subtract 15 minutes from one of the times (Variables).<BR><BR>E.G (Gotime = StrTime - 00:15) I want the result to show up on my page as a time such as 10:15 AM.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Subtracting Times

    try this...<BR>&#060;%=dateadd("s",-(15*60),now)%&#062;<BR><BR>this subtracts 15 minutes from the current time...<BR>my book seems to have an error in it, saying that &#039m&#039 represents month at the same time it represents minutes so i had to improvise and use &#039s&#039 and multiply 60 seconds by 15 to get minutes... if anyone know the symbol minutes let me know...<BR>

Posting Permissions

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