Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to truncate a timestamp to the base date?

How to truncate a timestamp to the base date?

Super Collaborator

I'm trying to figure out how to take a timestamp like this 1508167804 (which is Monday, October 16, 2017 3:30:04 PM) and convert it to a timestamp like this 1508112000 (which is Monday, October 16, 2017 12:00 AM).

Do I have to convert it to a Date and then convert it back, or is there a simpler way to accomplish this?

Don't have an account?
Coming from Hortonworks? Activate your account here