WHY is this happening to time()

Results 1 to 2 of 2

Thread: WHY is this happening to time()

  1. #1
    RAHUL Guest

    Default WHY is this happening to time()

    why is this happening <BR>when i am adding 72 to the below time field it is giving date also and not even adding the time ?<BR><BR>3:42:18 PM (add 72 to this) (suppreptime)<BR>12/31/1899 3:42:18 PM (giving this) (respotime)<BR><BR>i am using these code<BR>Dim respotime<BR>respotime = rs("supprepTime") + 72<BR><BR>how can I add.. <BR>help appreciated <BR><BR>Thanks<BR>Rahul

  2. #2
    Join Date
    Dec 1969

    Default Because you didn't read the manual...

    When you add an integer to a Date/Time value (and there are *no* "time" values in VBS, no matter what you might think), you are adding a certain number of *days*.<BR><BR>You need to read about the DateAdd function in the VBScript manual. (The manual is available via the "VBScript Reference" link in the left panel of this page.)<BR><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