Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have date field with below records. Please help me to derive Month and Date(DD/MM/YYYY)field from below date field.
Date
CMM 01 May 2020
CCM 02 Apr 2019
CCM 05 Aug 2020
CCM 10 April 2020
Thanks in advance
I see that you have asked for help to extract year from these dates in another post. Therefore, posting the entire date extraction here. Try like:
Load
Year(Date) as Year,
Month(Year) as Month,
Date;
Load
MakeDate(Year, Month(Date#(MonthText, 'MMM')), Day) as Date;
Load
Subfield(Date, ' ',4) as Year,
Left(Subfield(Date, ' ', 3),3) as MonthText,
Num(Subfield(Date, ' ', 2)) as Day
From <>;
This is for day, month, year, and full date:
SUBFIELD(Date,' ',2) AS Day,
LEFT(SUBFIELD(Date,' ',3),3) AS Month,
RIGHT(Date,4) AS Year,
DATE(DATE#(SUBFIELD(Date,' ',2) & LEFT(SUBFIELD(Date,' ',3),3) & RIGHT(Date,4),'DDMMMYYYY'),'DD.MM.YYYY') AS Date
I see that you have asked for help to extract year from these dates in another post. Therefore, posting the entire date extraction here. Try like:
Load
Year(Date) as Year,
Month(Year) as Month,
Date;
Load
MakeDate(Year, Month(Date#(MonthText, 'MMM')), Day) as Date;
Load
Subfield(Date, ' ',4) as Year,
Left(Subfield(Date, ' ', 3),3) as MonthText,
Num(Subfield(Date, ' ', 2)) as Day
From <>;
This is for day, month, year, and full date:
SUBFIELD(Date,' ',2) AS Day,
LEFT(SUBFIELD(Date,' ',3),3) AS Month,
RIGHT(Date,4) AS Year,
DATE(DATE#(SUBFIELD(Date,' ',2) & LEFT(SUBFIELD(Date,' ',3),3) & RIGHT(Date,4),'DDMMMYYYY'),'DD.MM.YYYY') AS Date