Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to convert a date format from Aug 01, 2024 to 08/01/2024. Date#(VisitDate,'MM DD, YYYY'),'MM/DD/YYYY') doesn't work but Date#(VisitDate,'MMM DD, YYYY'),'MM/DD/YYYY') does. I'm wondering what's the difference between MMM and MM?
Thanks in advance!
you are correct @wanyunyang , your initial question about MMM and MM, thats means how is going to be recognized or represented the month field, as number, for example for August MM = '08' and as text, MMM = 'Aug',
T:
Load *,
Date(Date#(vistdate,'MMM DD YYYY'),'MM/DD/YYYY') AS NEWDATE;
Load * Inline [
vistdate
Aug 01 2024
];
Hi @sriram____777 , i made a little changes to onsidered the comma in the date :
T:
Load *,
Date(Date#(vistdate,'MMM DD, YYYY'),'MM/DD/YYYY') AS NEWDATE, ///sriram opt
Date(Date#(purgechar(text(vistdate), ','),'MMM DD YYYY'),'MM/DD/YYYY') AS NEWDATE2; // fq option
Load * Inline [
vistdate
"Aug 01, 2024"
];
Hi @sriram____777 @QFabian , thank you for your responses, but I was wondering why MMM worked but MM didn't?
you are correct @wanyunyang , your initial question about MMM and MM, thats means how is going to be recognized or represented the month field, as number, for example for August MM = '08' and as text, MMM = 'Aug',