Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikSensor
Partner - Creator
Partner - Creator

Format a timestamp

Hi, I had several problems with timestamps. OK, now I managed to set it in the data manager, by clicking this rectangle and set the field to timestamp. FYI: I just need the date out of the timestamp.

I furthermore set in the load script that dates shall be like this format:

SET TimeFormat='hh:mm:ss';
SET DateFormat='DD.MM.YYYY';
SET TimestampFormat='DD.MM.YYYY hh:mm:ss[.fff]';

But if I use my date now in a table or diagram, it shows up as a number. What can I do on that?

Labels (1)
  • Chart

1 Solution

Accepted Solutions
GOKULAKANNAN
Creator II
Creator II

Hi,

Use Date(datefield,'yyyy-mm-dd'), it will work.

Thanks

View solution in original post

2 Replies
GOKULAKANNAN
Creator II
Creator II

Hi,

Use Date(datefield,'yyyy-mm-dd'), it will work.

Thanks

ElisaF
Contributor III
Contributor III

Hi,

See the link below, as well as the attached document which is very useful.

https://community.qlik.com/t5/Design/Date-Function-vs-Date-Function/ba-p/1837175#:~:text=The%20Date%....

NOTE: It is very important to identify the format of the field that is loaded and displayed in the dashboard objects (table or diagram)
If the field in the data source is in timestamp format ('YYYY-MM-DD hh:mm:ss) and you want to display only in date format, you must convert the field from timestamp to date.
Example:
Date(Floor(Date#(datefieldtimestamp, 'YYYY-MM-DD hh:mm:ss'),'DD.MM.YYYY')