Solved How to format Date to UK dd-mm-yyyy

Number11

Member
Local time
Today, 00:14
Joined
Jan 29, 2020
Messages
623
Hello,

I need to change the formatting of this strange date layout to standard uk date

2021-11-24T01:00:00.000Z

2021-12-13T11:18:10.684Z
 
CDate(Left$([DateField], Instr(1, [DateField], "T")-1)

then use your Regional setting to set the Date format to UK.
 
CDate(Left$([DateField], Instr(1, [DateField], "T")-1)

then use your Regional setting to set the Date format to UK.
doesn't seem to work getting syntax error on CDate
 
add another ) at the end:

CDate(Left$([DateField], Instr(1, [DateField], "T")-1))
 
add another ) at the end:

CDate(Left$([DateField], Instr(1, [DateField], "T")-1))
nope

1643374506370.png
 
If you want to retain the time data try (from the immediate window)

?cdate(left (Replace ("2021-11-24T01:00:00.000Z","T"," "),19))
24/11/2021 01:00:00

In a query
CDate( Left (Replace ([DateField],"T"," "),19))
 
If you want to retain the time data try (from the immediate window)

?cdate(left (Replace ("2021-11-24T01:00:00.000Z","T"," "),19))
24/11/2021 01:00:00

In a query
CDate( Left (Replace ([DateField],"T"," "),19))
Thank you that did the job :)
 

Users who are viewing this thread

Back
Top Bottom