Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jharder22
New Contributor III

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

Tags (1)
1 Solution

Accepted Solutions
jharder22
New Contributor III

Re: Date DD/MM/YYYY

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.

4 Replies
jharder22
New Contributor III

Re: Date DD/MM/YYYY

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.

Re: Date DD/MM/YYYY

Please make your question as answered,please.

MVP
MVP

Re: Date DD/MM/YYYY

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
Valued Contributor II

Re: Date DD/MM/YYYY

Also suggest you reading this blog post:

The Master Time Table