Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
varunreddy
Creator III
Creator III

How to truncate timestamp

Hi Guys,

I am looking to truncate time stamp. i.e MM/DD/YYYY hh:mm:ss to MM/DD/YYYY

For example:

8/7/2015 17:00:00 to 8/7/2015

Thanks in advance!

Regards,

Varun

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Use  something like

Date(Floor( TimestampField), 'MM/DD/YYYY') as Date

or if you need to interprete your timestamp

Date(Floor( Timestamp#( TimestampField,'MM/DD/YYYY hh:mm:ss')),'MM/DD/YYYY') as Date

View solution in original post

3 Replies
swuehl
MVP
MVP

Use  something like

Date(Floor( TimestampField), 'MM/DD/YYYY') as Date

or if you need to interprete your timestamp

Date(Floor( Timestamp#( TimestampField,'MM/DD/YYYY hh:mm:ss')),'MM/DD/YYYY') as Date

sunny_talwar

Try this:

Date(Date#(Left(TimeStampField, 8), 'M/D/YYYY'), 'MM/DD/YYYY') as Date

varunreddy
Creator III
Creator III
Author

Thank You Swuehl.

Regards,

Varun