Qlik Community

Qlik Sense Cloud Discussions

Highlighted
lukasrocek21
New Contributor III

Problems with date format

Hello, I have problem with date format. These dates are from one sheet, where is the same format for all cells, but in Qlik are two formats, via picture... It is a table with two column dimensions and I need sort fail description by repair date. Formula in DATE dimension is the same as in title of second column. Duplicate rows are not problem.

Thanks for your answers

descriptproblem.PNG

1 Solution

Accepted Solutions
MVP
MVP

Re: Problems with date format

Sunny suggested to use above in the LOAD script, not in your table chart expression. It's recommended to fix timestamp interpretation issues in the script, not in the front end.

But you can try for now in your chart expression like

=TimeStamp(Alt(Num([Repair Scan Date]), Num(Date#([Repair Scan Date], 'YYYY-MM-DD hh:mm:ss')), Num(Date#([Repair Scan Date], 'M/D/YYYY h:mm:ss TT'))))

Why don’t my dates work?

Get the Dates Right

View solution in original post

5 Replies

Re: Problems with date format

I think both the dates are not read as date, may be try this in the load script:

TimeStamp(Alt(Num([Repair Scan Date]), Num(Date#([Repair Scan Date], 'YYYY-MM-DD hh:mm:ss')), Num(Date#([Repair Scan Date], 'M/D/YYYY h:mm:ss TT')))) as [Repair Scan TimeStamp],


Date(Floor(Alt(Num([Repair Scan Date]), Num(Date#([Repair Scan Date], 'YYYY-MM-DD hh:mm:ss')), Num(Date#([Repair Scan Date], 'M/D/YYYY h:mm:ss TT'))))) as [Repair Scan Date]

lukasrocek21
New Contributor III

Re: Problems with date format

Sorry. but "Error in expresion"...

MVP
MVP

Re: Problems with date format

Sunny suggested to use above in the LOAD script, not in your table chart expression. It's recommended to fix timestamp interpretation issues in the script, not in the front end.

But you can try for now in your chart expression like

=TimeStamp(Alt(Num([Repair Scan Date]), Num(Date#([Repair Scan Date], 'YYYY-MM-DD hh:mm:ss')), Num(Date#([Repair Scan Date], 'M/D/YYYY h:mm:ss TT'))))

Why don’t my dates work?

Get the Dates Right

View solution in original post

lukasrocek21
New Contributor III

Re: Problems with date format

Thanks for your answers, Sunny and Stefan

Re: Problems with date format

Although you have got what you wanted by doing this on the front end, I would still suggest to fix the dates in the back end script. It is advised to keep front end dimensions to minimum manipulation and something as important as date should be fixed in the script because they are usually used in various places (set analysis and dimensions). Just wanted to give me additional 2 cents .

Best,

Sunny