G
Guest
Can anyone advise the code to use an Access query to convert a date or time
to a string - e.g. 04/07/2005 to 04072005?
Thanks
to a string - e.g. 04/07/2005 to 04072005?
Thanks
If you want to add the time up to seconds then
=cstr(format([MyDate],"ddmmyyyyhhmmss")
Dudley said:Can anyone advise the code to use an Access query to convert a date or time
to a string - e.g. 04/07/2005 to 04072005?
Thanks
John Spencer (MVP) said:Whoops.
The format character for minutes is "n" not "m" - m is already used for Month,
so some other character has to be used for minutes.
=cstr(format([MyDate],"ddmmyyyyhhnnss")
Also, FYI the format function creates a string, so CStr is not really needed.
If you want to add the time up to seconds then
=cstr(format([MyDate],"ddmmyyyyhhmmss")
Dudley said:Can anyone advise the code to use an Access query to convert a date or time
to a string - e.g. 04/07/2005 to 04072005?
Thanks
Ofer said:Try this, convert to string after formating
cstr(format([DateField],"ddmmyyyy")
Dudley said:Can anyone advise the code to use an Access query to convert a date or time
to a string - e.g. 04/07/2005 to 04072005?
Thanks
E-mail report using Lotus Notes rather t said:Ofer,
You are a god...I can just kiss you man...I been looking for this for a
while...thank you so much dude...
Ofer said:Try this, convert to string after formating
cstr(format([DateField],"ddmmyyyy")
Dudley said:Can anyone advise the code to use an Access query to convert a date or time
to a string - e.g. 04/07/2005 to 04072005?
Thanks