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

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date DD/MM/YYYY

Hi,

  I have a date field in DD/MM/YYYY 0:00 format. 

DateOfTransaction
23/04/2016 0:00

How do I get QS to correctly read that format. I changed the SET to

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff] TT';

and I tried

Date(DateOfTransaction), 'DD/MM/YYYY',

Thanks in advance

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

HI

I think I got it

    Date(alt(Date#(DateOfTransaction, 'DD/MM/YYYY hh:mm')), 'DD/MM/YYYY') as TrnsDate,

I then added a master calendar and the dates look correct.

View solution in original post

4 Replies
Anonymous
Not applicable
Author

HI

I think I got it

    Date(alt(Date#(DateOfTransaction, 'DD/MM/YYYY hh:mm')), 'DD/MM/YYYY') as TrnsDate,

I then added a master calendar and the dates look correct.

robert_mika
Master III
Master III

Please make your question as answered,please.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Also it is better to add floor() to round off the time if you do not require it.  Not sure why you added Alt(), I think it is not required here.

Date(Floor(Date#(DateOfTransaction, 'DD/MM/YYYY hh:mm')), 'DD/MM/YYYY')as TrnsDate,


Regards,

Jagan.

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Also suggest you reading this blog post:

The Master Time Table