Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Convert date format 'MM/DD/YYYY' to 'DD/MM/YYYY'

Hello Dear experts,
I am facing an issue with some dates into my data set, i have many dates with the next format 'DD / MM / YYYY' but also i have some with this format 'MM / DD / YYYY' so these dates are not valid to my date format.
it's possible to convert those dates to 'DD / MM / YYYY' format? Like: If into the date field the Month position it's greatern than 12 change the from 'MM / DD / YYYY' to 'DD / MM / YYYYY'?

I hope someone already dealed with something like this.

Regards.

4 Replies
Highlighted
Creator
Creator

Re: Convert date format 'MM/DD/YYYY' to 'DD/MM/YYYY'

Hi ,
Use Date(Date#('Date_Feild','Existing format '),'New Format') AS Date_Feild in the script function .
Highlighted
Partner
Partner

Re: Convert date format 'MM/DD/YYYY' to 'DD/MM/YYYY'

Hello AdiPai,
These only change the format of my date field, i want to keep my actual date format, just want to convert the dates with different format(MM/DD/YYYY) to my actual format(DD/MM/YYYY).


Regards.

Highlighted
Contributor III
Contributor III

Re: Convert date format 'MM/DD/YYYY' to 'DD/MM/YYYY'

What you are asking is basically impossible, since you don't have any way to recognize the date format for dates with 12 or less in the DD part. For example, you cannot define if 03/04/2020 is DD/MM/YYYY or MM/DD/YYYY.

Highlighted
Creator
Creator

Re: Convert date format 'MM/DD/YYYY' to 'DD/MM/YYYY'

it would be impossible to say what 01/01/2020 means ..  Why is the date in same feild in 2 formats ? are they from different sources - if yes ,and we know if source 1 = MM/DD/YYYY and Source 2 = DD/MM/YYYY we can seperate the data into 2 feilds - convert them back to a single format and then join these feilds together .