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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikconsultant
Creator III
Creator III

Timestamp without seconds?

I need from a timestamp in a new atribute DD.MM.YYYY HH:MM.

For that i use:

date([mytimestamp])&' '&time(frac(floor([mytimestamp],1/1440)),'hh:mm') as timedatevalue

This skript works but if the time HH:MM:00 the he put the new value one minute before.

Example.: 16:50:00 ends as 16:49

Any idea how can i fix that or any sugestion how I can get DD.MM.YYYY HH:MM on an different way?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

timestamp#( timestamp( mytimestamp, 'DD.MM.YYYY hh:mm'), 'DD.MM.YYYY hh:mm') as timedatevalue

View solution in original post

3 Replies
swuehl
MVP
MVP

Try

timestamp#( timestamp( mytimestamp, 'DD.MM.YYYY hh:mm'), 'DD.MM.YYYY hh:mm') as timedatevalue

Not applicable

Hi Markus,

maybe the the fraction 1/1440 is not as smooth as one would expext.

Please try Date#(Date(mytimestamp)&' '&Hour(mytimestamp)&':'& Minute(mytimestamp))

Hope it helps.

Grüße

Klaus

Not applicable

swuehlwas faster and has the better code snippet.