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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rahulsingh12
Contributor III
Contributor III

Date Column In Qlikview

Hi,

I have a date column where I get data in varchar not in date format.

ColA

01/2018

01/06/2018

21/12/2017 12:00:00 AM

I need to convert them to a standard date format of DD-MM-YYYY.

If I try the below i get a null date column.

date(date#(ColA,'dd/mm/yyyy hh:mm:ss am'),'DD-MM-YYYY')

What is that I am doing wrong.

Regards

Labels (1)
3 Replies
Chanty4u
MVP
MVP

jonathandienst
Partner - Champion III
Partner - Champion III

Like this:

Date(

    Alt(

        Date#(ColA, 'dd/MM/yyyy hh:mm:ss tt'),

        Date#(ColA, 'dd/MM/yyyy'),

        Date#(ColA, 'MM/yyyy)

    )

,'dd/MM/yyyy')

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
rahulsingh12
Contributor III
Contributor III
Author

Hi Jonathan,

I think your solution seems to work.

I am testing it further if all seems fine I will mark your answer as the correct answer.

Regards,

Rahul