Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

date function informations

hi,

I' ve a little question about the date function, the problem is the following:

I need a function to do this:

2012001 must become= 1/1/2012

2012002 must become= 2/1/2012

....

2012032 must become= 1/2/2012

...

thank you very much

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Assuming you want this in script (let's call your input dates InputDate):

     ...

     Date(MakeDate(Left(InputDate, 4), 1, 1) + Mid(InputDate, 5, 9)) As OutputDate,

     ...

You can use the same logic in an expression, but this sort of transform should be done in script)

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Assuming you want this in script (let's call your input dates InputDate):

     ...

     Date(MakeDate(Left(InputDate, 4), 1, 1) + Mid(InputDate, 5, 9)) As OutputDate,

     ...

You can use the same logic in an expression, but this sort of transform should be done in script)

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein