Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > about date code..

Reply
Thread Tools

about date code..

 
 
Guest
Posts: n/a
 
      10-04-2004
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

 
Reply With Quote
 
 
 
 
Jonathan Chong
Guest
Posts: n/a
 
      10-04-2004
<> 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.


 
Reply With Quote
 
 
 
 
Manohar Kamath
Guest
Posts: n/a
 
      10-04-2004
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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date, date date date.... Peter Grison Java 10 05-30-2004 01:20 PM
Given a date, how to find the beginning date and ending date of that week Matt ASP General 11 11-08-2003 11:24 PM
Given a date, how to find the beginning date and ending date of that week Matt ASP .Net 1 11-08-2003 09:14 PM
Given a date, how to find the beginning date and ending date of that week Matt C Programming 3 11-08-2003 09:07 PM
Given a date, how to find the beginning date and ending date of that week Matt C++ 2 11-08-2003 08:30 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57