combine date and time w/out symbols

J

jewski

I need to be able to combine into one field the current date and time
together without the symbols. Can anyone help. Let me know if you need more
information
Thanks
 
R

Rick B

I would think you would use something like...

=Format(Date(),"MMDDYY") & Format(Time(),"HHNNSS")

I have not tested that. You can probably look at the help files to verify
it.
 
J

jewski

thanks. works like a charm.

Rick B said:
I would think you would use something like...

=Format(Date(),"MMDDYY") & Format(Time(),"HHNNSS")

I have not tested that. You can probably look at the help files to verify
it.
 
J

John Vinson

thanks. works like a charm.

Works fine... but there's an even simpler alternative:

Format(Now(), "mmddyyhhnnss")

Date() returns the date portion of the system clock date/time; Time()
the fractional time portion; Now() gives you the whole thing.

John W. Vinson[MVP]
 
Top