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: 
Nirpanthan
Contributor III
Contributor III

Changing date varchar to date format

Hi guys,

Facing an issue in which the Date is in varchar format(01-Jan-20,01-Feb-2020,01-Mar-2020 & 02-Jan-20,02-Feb-2020,02-Mar-2020)for 6 months data.

For eg: as it is in varchar it is getting sorted 

Date
01-AUG-19
01-FEB-19
01-JAN-19
01-JUL-19
01-JUN-19
01-MAR-19
02-APR-19
02-AUG-19
02-FEB-19
02-JAN-19
02-JUL-19
02-MAR-19
02-MAY-19
03-APR-19
03-AUG-19
03-FEB-19

  i want to make it into month/year

i have tried this:

Date(Date#(Date, 'DD/MM/YYYY ')), 'YYYY-MM-DD') as Date

Thanks in Advance

Labels (1)
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Use

Date(Date#(Date, 'DD-MMM-YY '), 'MM/DD/YYYY') as Date

Change the second expression to the format you need.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

Use

Date(Date#(Date, 'DD-MMM-YY '), 'MM/DD/YYYY') as Date

Change the second expression to the format you need.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein