Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
johnan
Creator III
Creator III

Format timestamp

Hi, this timestamp: 23.08.2023 11:17:42.000

How to get the date out of it 🙂

Labels (1)
  • Other

3 Replies
henrikalmen
Specialist
Specialist

This should give you date in ISO8601 format: Date(Timestamp#('23.08.2023 11:17:42.000', 'DD.MM.YYYY hh:mm:ss.fff'), 'YYYY-MM-DD')

If you just want the date part as a string you could do: left('23.08.2023 11:17:42.000', 10)

PrashantSangle

23.08.2023 11:17:42.000

try 

Date(Timestamp#('23.08.2023 11:17:42.000','DD.MM.YYYYY hh:mm:ss.fff'))

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Vegar
MVP
MVP

⚠️ Warning. Be cautioninous when using the formating function date(). It does not convert values into a date value it only formats how the value is displayed.

Take a look at my example below. Notice how I use date() for the field Date_stamp and the function dayname() for DayName_stamp.  And that those are displayed identical in the first table.  But using a filter pane/listbox you notice that Date_stamps have three "identical" values and DayName_stamp has only one. This is because Date_stamp still holds the three timestamp values, but it only displays them as a date.

I would recommend you to use dayname() or put a floor around the value you put into the date function, like this date(floor(...)) in order to get a date value and not only a date presentation.

Vegar_0-1694523371355.png