Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Supplink
New Contributor II

Different Date Formats

Ive been having this problem for months and I still can't fix it.

I export this info as text but for some reason Qlik changes the format to time stamp.

How can I convert it to a uniform  date format   ('DD/MM/YYYY'.) 

 dates.jpg

Labels (1)
2 Solutions

Accepted Solutions
pradosh_thakur
Honored Contributor II

Re: Different Date Formats

date(floor(alt(timestamp#(Fecha_Stock,'DD/MM/YYYY hh:mm:ss'),date#(Fecha_Stock,'DD/MM/YYYY'))),'DD/MM/YYYY')
Learning never stops.
Highlighted

Re: Different Date Formats

Hi @pradosh_thakur

I like the alt() approach to handle different formats.  Though in this case I think you can get by with a single format and not use alt.

'DD/MM/YYYY[ hh:mm:ss]'

The [ ] indicate an optional portion.

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

4 Replies
pradosh_thakur
Honored Contributor II

Re: Different Date Formats

date(floor(alt(timestamp#(Fecha_Stock,'DD/MM/YYYY hh:mm:ss'),date#(Fecha_Stock,'DD/MM/YYYY'))),'DD/MM/YYYY')
Learning never stops.
Highlighted

Re: Different Date Formats

Hi @pradosh_thakur

I like the alt() approach to handle different formats.  Though in this case I think you can get by with a single format and not use alt.

'DD/MM/YYYY[ hh:mm:ss]'

The [ ] indicate an optional portion.

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

pradosh_thakur
Honored Contributor II

Re: Different Date Formats

Hi Rob,

I was not aware of this, so thank you for letting us know. I have learnt a lot from you and your posts. I hope that continues.

Thanks
Pradosh
Learning never stops.
Supplink
New Contributor II

Re: Different Date Formats

Thanks A Alot!
Community Browser