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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
kabibi15
Contributor III
Contributor III

Qlik Sense Function

Does  anybody know the function to convert date in Qlik sense. For example converting '09-18-2000 17:14:07' to '18-Sep-2000 17:14:07'. Thanks.

6 Replies
Anil_Babu_Samineni

Perhaps this?

=Date(Date#('09-18-2000 17:14:07', 'MM-DD-YYYY hh:mm:ss'), 'DD-MMM-YYYY hh:mm:ss')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
kabibi15
Contributor III
Contributor III
Author

Thanks a lot that works. But I have a date field 'SET_STATUS_DATE' which i will like to use so that my results should be base on that field.

Anil_Babu_Samineni

you can use field over the expression like

=Date(Date#(SET_STATUS_DATE, 'MM-DD-YYYY hh:mm:ss'), 'DD-MMM-YYYY hh:mm:ss')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
kabibi15
Contributor III
Contributor III
Author

Thanks. After using your suggested functions/expression the results is blank/null. any other functions?

Anil_Babu_Samineni

Where are you trying this? If this is script you can use 

This is for all rows are in same format

Date(Date#(SET_STATUS_DATE, 'MM-DD-YYYY hh:mm:ss'), 'DD-MMM-YYYY hh:mm:ss')

This is for all rows in different format

Date(Alt(Date#(SET_STATUS_DATE, 'MM-DD-YYYY hh:mm:ss'), Date#(SET_STATUS_DATE, 'Your Format Here'), Date#(SET_STATUS_DATE, 'Your Format Here'), ....), 'DD-MMM-YYYY hh:mm:ss')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
kabibi15
Contributor III
Contributor III
Author

I'm trying this at the Expression editor because i don't have access to QMC.