Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is it possible to make a date field from period field?
Like 01.01.2018 from 01.2018
DD.MM.YYYY MM.YYYY
Thanks
Logically your solution seems to be perfect but unfortunately i am getting blank result by applying it.
Several options, some of these already discussed above:
Date(Date#(PeriodField, 'MM.YYYY')) AS DateField // this will produce a date like 01.01.2018 (first day of the period)
There is no need to complete this with the day or any output mask if the first day of the month is OK.
MakeDate(Right(Field, 4), Left(Field, 2)) AS DateField // again, no need to specify day, it will use the first day of the month
Yep, then
Date(Date#(Period, 'YYYYMM')) AS DateField
Will store in DateField the first day of that month.
EDIT: all answers provided were enough, but the format you provided initially 'MM.YYYY' does not match with the one you provided here 'YYYYMM'.
Load date(MonthStart(Date#(dateField,'YYYYMM')),'DD.MM.YYYY') as NewDateField Inline [
dateField
201801
201802
201803
201804
];
result:
for me result like below
Can you paste your expression here exactly as it is in your app?
Yes sorry, it's a formatting mistake from my side provided here.
Now it works fine.
Thanks a lot!
Thank you so much!
Perfect solution..
thank please close the thread by marking the correct answer as correct and the helpful as helpful
Thanks