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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert Timestamp to Date

Hello Community,

I have a Timestamp date For example (2012-03-29 11:35:24.6270000 +00:00), I need to get the Date from this i.e 2012-03-29.

Please find the sample file.

I want it using Date functions only.

Note: I tried below expressions, but dint work.

date(floor(CompleteWorkflowDate))

Thanks,

Angad

1 Solution

Accepted Solutions
Sokkorn
Master
Master

Or try with this long function

=Date(Floor(Date#(CompleteWorkflowDate,'YYYY-MM-DD hh:mm:ss.fffffff +ff:ff')))

Regards,

Sokkorn

View solution in original post

5 Replies
Sokkorn
Master
Master

Hi Angad,

How about this one =Left(CompleteWorkflowDate,10)

Regards,

Sokkorn

Sokkorn
Master
Master

Or try with this long function

=Date(Floor(Date#(CompleteWorkflowDate,'YYYY-MM-DD hh:mm:ss.fffffff +ff:ff')))

Regards,

Sokkorn

Not applicable
Author

BINGO!

Thanks a lot Sokkorn. I was not aware about those extra fffff's .

Thanks,

Angad

Not applicable
Author

I found this answer very helpful in solving my own problem.

I had a CSV file loaded and needed to convert it's many timestamp fields into a date.

Here is my slightly different code:

Date(floor(NUM(Timestamp#([FIELD NAME], 'DDMMMYYYY:hh:mm:ss')))) AS [NEW FIELD NAME],

Thanks,

Paul

Not applicable
Author

Thanks for sharing Paul. I am happy that it was helpful to you as well

Thanks,

Angad