Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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
Luminary Alumni
Luminary Alumni

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