Hi everyone,
I need to format a date into yyyy-MM-dd, for example 2015-06-22.
I tried the following:
FORMAT(date,0,'<Year4><Month,2><Day,2>')
But I got
20150622 as a result.
I tried the following:
FORMAT(date,0,'<Year4>-<Month,2>-<Day,2>')
but I got
22/06/2015 as a result.
What shall I do?
Thanks in advance
Comments
You're right, the message returns 2015-06-22 but when I write it to my .csv file, I get 22/06/2015
Is the date formatted in the same way if you open your .csv file in a text editor instead of Excel, for example Notepad.
Excel usually convert fields to local format if it is able to guess the data type.