Solved Change Date

Number11

Member
Local time
Today, 05:58
Joined
Jan 29, 2020
Messages
624
Hello,

So i need to change the date format from 00/00/0000 to YYYYMMDD please can confirm the best way to convert this :)
 
Sorted it..
Format(CDate(Format([DateField],"dd-mm-yyyy")),"yyyymmdd"
 
if it is a Real Date field, you can simplify it:

Format([DateField], "yyyymmdd")
 
Why on earth are you formatting first to dd-mm-yyy and then to yyyymmdd ? :(
 
Use arnel's suggestion.

Remember formatting dates is for human consumption or in this case, I'm assuming that you are formatting the date so you can use a query to export it to a different application.
 

Users who are viewing this thread

Back
Top Bottom