Changing Date/Time format

senn2912

New member
Local time
Yesterday, 20:39
Joined
Nov 23, 2011
Messages
7
Hi All,

Can you please help?

I am having difficulties changing a date/time field like '22/04/2013 09:14' to make it look like '2013-04-22 09:14' using a query.

Can someone please suggest a way of changing this?

Thanks,

G
 
If you want to change the format in the query you'll need to do as follows:

format(myDate,"yyyy-mm-dd hh:nn")

Note this returns a string so will sort accordingly
 
Thanks for that.

Quick question, i should know this but i seem to have a memory block....how do i change a field in a query to TEXT.

Do i start my query by using FORMAT([Time]etc......

G
 
The format function will always change a value to text.

within a query it might look something like this:

SELECT Fld1, Fld2, format(myDate,"yyyy-mm-dd hh:nn") as ADate From myTable
 

Users who are viewing this thread

Back
Top Bottom