Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement where the following Date Field (contains Year and Month only) needs to be converted into YYYY_MM format. Can somebody please advise on this. I have tried few options form my side but they are not giving the expected output.
Input YearMonth | Output YearMonth |
2019_3 | 2019_03 |
2020_1 | 2020_01 |
2019_10 | 2019_10 |
2019_11 | 2019_11 |
The transformation is highlighted in blue/bold in Output YearMonth.
Thank you!
Regards,
SK
Hi,
Maye be ;
Date(Date#([Input YearMonth],'YYYY_MM'),'YYYY_MM') as [Output YearMonth]
output :
Hi,
Maye be ;
Date(Date#([Input YearMonth],'YYYY_MM'),'YYYY_MM') as [Output YearMonth]
output :
May be this
Date(MakeDate(SubField(YearMonth, '_', 1), SubField(YearMonth, '_', -1)), 'YYYY-MM') as YearMonth
Thanks Taoufiq. It worked. I was missing the second YYYY_MM in my trials.
Regards,
SK