Extract time part like hour, second from timestamps

Hello there,

Is there an easy way of extracting time parts from a timestamp data type?
Currently, I have to convert the timestamp into a formatted text and then using text functions extract different parts of the date and time. Then again convert the hour, seconds etc into number for any comparison.

Thank you!

Formatting and parsing is not a bad idea if you use simple formatting:

asnumber(format([Time],"hh")) //Hours 12h
asnumber(format([Time],"HH")) //Hours 24h
asnumber(format([Time],"mm")) //Minutes
asnumber(format([Time],"ss")) //Seconds
asnumber(format([Time],"fff")) //Milliseconds
format([Time],"tt") //AM/PM

time-parts.morph (3.9 KB)

Great! Thank you!