about date code..

G

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
 
J

Jonathan Chong

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

Use the DateAdd function of VBScript.
 
M

Manohar Kamath

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


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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top