Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need to extract hours from Time field in table

Hello Community,

I need your help.I want to know that how can i extract hours from the "Time" field in table as i am trying to extract in the following way :

Load

SLUG,

Hour("Time") as [Extracted Hours]

from

Source file

but this query is giving me the null values in Extracted Hours column instead of giving me the hours extracted from the Time field.

kindly suggest me some solution,

Thanks in advance

1 Solution

Accepted Solutions
martinpohl
Partner - Master
Partner - Master

So use

hour(time#("Time",'hh:mm:ss:ff'))

Regards

View solution in original post

6 Replies
martinpohl
Partner - Master
Partner - Master

what Format is your Time-field?

Please give an example

marcus_sommer

Do you want this?

...

time(frac("Time")) as [Extracted Hours]

...

- Marcus

Not applicable
Author

time format in time field is : 05:00:02:19

Not applicable
Author

This query isn't extracting hours from time field.

I want to get the hours from time field and the format of time field is 05:00:02:19

martinpohl
Partner - Master
Partner - Master

So use

hour(time#("Time",'hh:mm:ss:ff'))

Regards

Not applicable
Author

Hey Martin Pohl now it's working perfectly.

Thanks a lot for the help.

Best Regards