Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
rustyfishbones
Master II
Master II

Date Timestamp

Hi All,

I have the following value - 2016-08-31 08:32:48:000 + 01:00

What is the best way to extract the date, I tried FLOOR and Date Function and it returns nothing.

I know I can try LEFT(DateTimeCreated,10) and that will return the date and I can then convert to DD/MM/YYYY instead of YYYY-MM-DD.

Any better methods to do this?

Thanks

Alan

1 Solution

Accepted Solutions
tresesco
MVP
MVP

If you use left() - a string function, it might not give you a real date (number at the back-end). You should rather use parsing function date#() alongwith it like and then format using date():

Date(Date#(LEFT(DateTimeCreated,10), 'YYYY-MM-DD'), 'DD/MM/YYYY ')

View solution in original post

2 Replies
tresesco
MVP
MVP

If you use left() - a string function, it might not give you a real date (number at the back-end). You should rather use parsing function date#() alongwith it like and then format using date():

Date(Date#(LEFT(DateTimeCreated,10), 'YYYY-MM-DD'), 'DD/MM/YYYY ')

rustyfishbones
Master II
Master II
Author

Thanks Tresesco