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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Separate part of a timestamp

Hello,

I was wondering if someone has a solution to separate the date and hour from a timestamp ("DD.MM.YYYY hh:mm")?!

Instead of "01.01.2009 03:54" I'd like to generate "01.01.2009 03"

I was thinking of using the makedate function somehow...

Any suggestions?

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes, I think you are on the right track. Something along the line of :

Floor(timestamp(value, 'MM.DD.YYYY mm:ss')) + MakeTime(Hour(timestamp(value, 'MM.DD.YYYY mm:ss')) )

-Rob

View solution in original post

3 Replies
Not applicable
Author

Hi Droz,

Do you wanna just omit the minutes?. I'm thinking this, based on your example "01.01.2009 03".

Best regards.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes, I think you are on the right track. Something along the line of :

Floor(timestamp(value, 'MM.DD.YYYY mm:ss')) + MakeTime(Hour(timestamp(value, 'MM.DD.YYYY mm:ss')) )

-Rob

Not applicable
Author

Dear Miguel and Rob - yes Miguel, that's it and Rob already found a solution that works 😉

Floor(timestamp(Value, 'MM.DD.YYYY hh:mm')) + MakeTime(Hour(timestamp(Value, 'MM.DD.YYYY hh:mm')))


Thanks a lot,

Nico