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: 
Alaska93
Contributor II
Contributor II

Convert Date Format

Hello community,

I have the 'DateCom' field in my dataset which is in text format. I want to convert it to date format ('DD/MM/YYYY').

However, the 'DateCom' field contains 4 different entries:

- DD/MM/YYYY

- DD/MM/YYYY hh:mm

- YYYY/MM/DD

- YYYY/MM/DD hh:mm

I used Date(Date#(.....)) but it only gives me rows for which I specified the format.

What can I do to solve this problem?

Thank you for your help

1 Solution

Accepted Solutions
marcus_sommer

You could use alt() for multiple converting like:

date(alt(date#(Field, 'Format1'), floor(timestamp#(Field, 'Format2')), ...)

- Marcus

View solution in original post

1 Reply
marcus_sommer

You could use alt() for multiple converting like:

date(alt(date#(Field, 'Format1'), floor(timestamp#(Field, 'Format2')), ...)

- Marcus