Discussion board where members can get started with Qlik Sense.
Is it possible to make a date field from period field?
Like 01.01.2018 from 01.2018
Go to Solution.
Load date(MonthStart(Date#(dateField,'YYYYMM')),'DD.MM.YYYY') as NewDateField Inline [
Yes, you can use Date#() function for this. It takes two parameters: a string with date value and a string defining date format. So in your exmple:
Of course you can use field names as the first parameter:
Hope this helps
load * Inline
LOAD * ,
Date(Date#(OrdDate,'MM.YYYY'),'DD.MM.YYYY') as New
I don't have date field. I have only Period field from which i want to make a date field.
Date# just generate the same period
By doing so, i got blank output.
Date#() generates the same period, but makes Qlik understand it is a date field. So after using Date#() on your period field you can work with it as with date field. Try Chanty's example to see for yourself
Date(Date#(PeriodField, 'MM.YYYY'), 'DD.MM.YYYY')
can u share 5 dates you already have? exactlly how they're written; this could help us
You need to complete the date then change it,
DATE(DATE#('01.'&DateField,'DD.MM.YYYY'),'DD.MM.YYYY') AS NewDate
This will make all your period the 1st of the month.
Then please share some real input data as this works for me.
I have period field in below format