Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Highlighted
Supplink
Not applicable

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
Not applicable

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.
rwunderlich
Not applicable

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
Not applicable

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.
rwunderlich
Not applicable

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
Not applicable

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
Not applicable

Re: Different Date Formats

Thanks A Alot!