Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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 - Creator III
Partner - Creator III

And like this ?

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

View solution in original post

9 Replies
Clement15
Partner - Creator III
Partner - Creator III

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 - Creator III
Partner - Creator III

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

Clement15
Partner - Creator III
Partner - Creator III

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 - Creator III
Partner - Creator III

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 - Creator III
Partner - Creator III

And like this ?

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

RobinTMavhu
Contributor III
Contributor III
Author

Thank you so much, problem solved!!