about date code..

Discussion in 'ASP General' started by Guest, Oct 4, 2004.

  1. Guest

    Guest Guest

    hi guys, my problem is when to get the date 3 day early, example if the date is 7/10/2004 and i want to get the date of 3 day early like 4/10/2004, do u guys have any idea.....thanks

    -----------------------------
    This message is posted by http://asp.forumszone.com
     
    Guest, Oct 4, 2004
    #1
    1. Advertising

  2. <> wrote in message
    news:...
    > hi guys, my problem is when to get the date 3 day early, example if the

    date is 7/10/2004 and i want to get the date of 3 day early like 4/10/2004,
    do u guys have any idea.....thanks
    >
    > -----------------------------
    > This message is posted by http://asp.forumszone.com
    >



    Use the DateAdd function of VBScript.
     
    Jonathan Chong, Oct 4, 2004
    #2
    1. Advertising

  3. If you have the date in a "date variable" then you can just add numbers to
    it to increment/decrement days:

    Dim myDay
    ' The variable will now have a date of 1/1/2004
    myDay = DateSerial(1, 1, 2004)

    ' Add 4 days. The variable will now have 1/5/2004 (US Notation)
    myDay = myDay + 4

    --
    Manohar Kamath
    Editor, .netWire
    www.dotnetwire.com


    <> wrote in message
    news:...
    > hi guys, my problem is when to get the date 3 day early, example if the

    date is 7/10/2004 and i want to get the date of 3 day early like 4/10/2004,
    do u guys have any idea.....thanks
    >
    > -----------------------------
    > This message is posted by http://asp.forumszone.com
    >
     
    Manohar Kamath, Oct 4, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    1
    Views:
    610
    Matthew Speed
    Nov 8, 2003
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,285
    Michael Borgwardt
    May 30, 2004
  3. Matt
    Replies:
    2
    Views:
    522
    Pete Becker
    Nov 8, 2003
  4. Matt
    Replies:
    3
    Views:
    726
    Richard Heathfield
    Nov 8, 2003
  5. Matt
    Replies:
    11
    Views:
    408
    Aaron Bertrand [MVP]
    Nov 8, 2003
Loading...

Share This Page