Results 1 to 2 of 2

Thread: How do I subtract a second

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Location
    NH
    Posts
    90

    How do I subtract a second

    Is there a way to subtract a second from a date variable?

    dim mytime as date

    mytime = mytime - ???

    thanks
    Scott

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    DateAdd function.

    VB Code:
    1. dim mytime as date
    2.  
    3. mytime = Now
    4. 'subtract 1 second
    5. mytime = DateAdd("s",-1,mytime)

Posting Permissions

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



Click Here to Expand Forum to Full Width