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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
billuran
Partner - Creator
Partner - Creator

Convert .TXT file Date Format

Hello All, I have a text document that has a date format as YYYY-MM-DD.

I have a .csv file that has a date lookup relation as MM/DD/YYYY. How do I change the date format YYYY-MM-DD to be able to have the correct look up relationship as the .csv file. IE MM/DD/YYYY.

Thanks!

3 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

Hi Bill,

Maybe something like below:

Date(MakeDate(subfield('2016-07-27','-',1),subfield('2016-07-27','-',2),subfield('2016-07-27','-',3)),'MM/DD/YYYY')

Jonathan

Colin-Albert
Partner - Champion
Partner - Champion

Try this

          date(date#('2016-07-27', 'YYYY-MM-DD'), 'MM/DD/YYYY')

or       date(date#(your_date_field, 'YYYY-MM-DD'), 'MM/DD/YYYY')

There are some useful posts on dates and date formatting here

Get the Dates Right

The Date Function

Why don’t my dates work?

Chanty4u
MVP
MVP

u can set  here also

SET DateFormat='MM/DD/YYYY';

or else   As colin

Try this

          date(date#('2016-07-27', 'YYYY-MM-DD'), 'MM/DD/YYYY')

or       date(date#(your_date_field, 'YYYY-MM-DD'), 'MM/DD/YYYY')