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: 
RobinTMavhu
Contributor III
Contributor III

Calculated Field to convert Date

The screenshot below refers, l want to create a Calculated Field to convert the column EFFDATE into a proper date format. Current format is 04/03/2024 07;06:22 which is a string and not proper date format for trend analysis.

RobinTMavhu_1-1710841128378.png

 

Labels (2)
1 Solution

Accepted Solutions
Clement15
Partner - Specialist
Partner - Specialist

And like this ?

Timestamp(Timestamp#(EFFDATE,'DD/MM/YYYY hh;mm:ss'))

View solution in original post

9 Replies
Clement15
Partner - Specialist
Partner - Specialist

Hello, would you like this field to be understood as a date field? This function in the script should work :

Timestamp(Timestamp#(EFFDATE,'DD/MM/YYYY hh:mm:ss')) as EFFDATE

 

RobinTMavhu
Contributor III
Contributor III
Author

Hi Clement

Yes however "as" is not being recognized

RobinTMavhu_0-1710842732698.png

 

Clement15
Partner - Specialist
Partner - Specialist

The function I gave you is to put the script in place of your current field, in the data load editor.

Clement15
Partner - Specialist
Partner - Specialist

I don't use the data manager, but I guess you just have to remove the last part ''as EFFDATE''

RobinTMavhu
Contributor III
Contributor III
Author

Thanks Clement

I am very new to Qlik and struggling which line do l really replace or i do it in the auto generated section

RobinTMavhu_0-1710843724227.png

 

Clement15
Partner - Specialist
Partner - Specialist

If you only use the data manager, try this formula in a Calculated Field
Timestamp(Timestamp#(EFFDATE,'DD/MM/YYYY hh:mm:ss'))

 

If you are just starting out, the data manager is useful, but to progress and open up possibilities, I advise you to learn how to use the data load editor.

RobinTMavhu
Contributor III
Contributor III
Author

Thank you, it's giving blank values

 

RobinTMavhu_0-1710844603460.png

 

Clement15
Partner - Specialist
Partner - Specialist

And like this ?

Timestamp(Timestamp#(EFFDATE,'DD/MM/YYYY hh;mm:ss'))

RobinTMavhu
Contributor III
Contributor III
Author

Thank you so much, problem solved!!