Difference between now, date, and time

D

David

Hi All,

What is the difference between Now() and Date() or Time(). I tried using
the Time() function and it worked on my home computer but not at work
I had to change it to Now().

TIA,
David
 
R

Rick Brandt

David said:
Hi All,

What is the difference between Now() and Date() or Time(). I tried using the
Time() function and it worked on my home computer but not at work I had to
change it to Now().

Date() returns current system date with a time of midnight

Time() returns current system time with Date of 12/30/1899

Now() returns current system date and time.

Failure of any of these is a classic symptom of having missing or broken VBA
references. Open a code window then...

Tools - References

....and look at all of the checked items. If any have the word "MISSING" after
them that is your problem. Those need to be either removed or corrected.
 
Top