Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference between date and now()

Status
Not open for further replies.

marcin2k

Programmer
Jan 26, 2005
62
CA
Anyone know the difference between date and now(). I noticed that using Now() after noon gives a different date then using is before noon. Why is this? Thanks any help would be great.
 
Date() returns a date and Now() returns a timestamp.
e.g:[tt]
Date: yyyy-mm-dd 00:00:00
Now: yyyy-mm-dd hh:nn:ss[/tt]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Date() is only date
Time Only time
Now() is date with time

Try those on immediate window result will be
?date
08/09/2005
?Time
4:52:17 PM
?Now
08/09/2005 4:52:23 PM

________________________________________________________
Zameer Abdulla
Help to find Missing people
You may be the boss' pet; but you are still an animal
 
If now gives a different date after noon then you need to check your AM PM Settings on your clock.



Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
Check your Time Zone (double click the system clock in the systray)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top