time, date

  • Thread starter Thread starter darkmooink
  • Start date Start date
D

darkmooink

Guest
is there a way of having todays date/time appear in a tabel automatically like a auto number?
can i have a way of doing both
 
instead of a label, put in a text box and in the control source section type...

=Date() & " " & Time()
 
In the fields 'Default Value' place Now()
 
Jibbadiah said:
instead of a label, put in a text box and in the control source section type...

=Date() & " " & Time()
??

Time() doesn't return the current time, it converts a given value in hours minutes and seconds to a decimal value.

If you want the date and time use Now()
 
Have you tried my exact syntax?!

Cos it works for me.

J.
 
Jibbadiah said:
Have you tried my exact syntax?!

Cos it works for me.
No. I happy to learn of Access's undocumented features. However your approach is longer than just using Now() and will return a text value instead of a date/time value.
 
Neil,

I agree with you... Now() is certainly the best option, and I'm surprised that I completely forgot it?!

The other option also works - and for the purposes of seeing them on a form they look exactly the same.

I have never put time on any of my forms... never had a need to. Unless you keep updating it, it would seem like a pretty pointless thing to display (esp seconds). Fair enough to include it in an audit trail or something, but otherwise I can't understand why you would want to show it full stop.

The breakdown allows him to use either or both... but NOW() would still be better.

J.
 

Users who are viewing this thread

Back
Top Bottom