Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
How to get hour part from given timestamp ? Hour should get round of to nearest value.
eg :01:35:21 -> "02"
00:21:45 -> 00
=Date(now(),'HH')
this is for current hour
you can use =Date(yourfield/varibalename,'HH')
if your varibale/field in some other format
then
Date(Date#(yourfield/varibalename,'Original DDMMYYY etc format'), 'HH')
what is the use of variablename ?
if your time stamp is saved in variable then put variable name else if it is in field then use field name
best way is upload sample application
i have column having timestamp alone, i would like to take only hour part of it.
This is required to do hourly analysis.
below are the possible values .
01:51:00
01:52:00
01:53:00
01:53:38
01:53:48
01:54:00
01:54:24
01:54:48
01:55:00
01:55:07
01:55:29
01:56:00
01:56:20
01:56:40
01:56:44
01:57:00
01:57:57
if(minute(Datetime)>=35,hour(Datetime)+1,hour(Datetime))
=SubField('01:35:21',':',1) + If(SubField('01:35:21',':',2)>=30,1,0)
use this
Date(Date#(ColumnName,'HH:MM:SS'), 'HH')