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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

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
Champion III
Champion III

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
MVP
MVP

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