# Extract time

Hello, friends! Tell me, how do I get only Time out of Date/Time? In Math, I do an hour (date) - hours are extracted, minutes can also be extracted separately. And how do I get the hours and minutes together?

You can always change the format of a date column to show only the time, but if you want a separate time column, then create a math column, put in ‘T’ for example, then replace ‘T’ with your date column value. It should automatically give you the option to change the formatting to time only.

1 Like

I need to move from the date/time column to another column only the time. Do not display the time, namely get the value in the time only column (without date).

How do you plan to use it?
If you just need it for display, then you can do what Jeff suggested. That is, pass the date/time through a math column and format it as time only.

1 Like

It’s not for me to display, I’m comparing two events in time. And the comparison does not work, I suspect that because of the presence of the date in the cell, although it is not visible

In what way does it not work?
Can you show the calculation that you’re using, the result you get, and the result you expect to get?

The task do not form an order during non–working hours of the store. There are three columns in the tab – the current time, the opening time of the store and the closing time of the store. All columns are Date/Time, Part - Time only. I make the condition an action – I compare the current time with the opening/closing time. And it doesn’t work as it should. It seems to me that the comparison takes into account the date, because the Date/Time column. Is that true?

Okay, so here is what I would suggest.

• Create 3 math columns using the following formula: `Hour(Time) + (Minute(Time)/60)`
– The first one should use your open time as a substitute for “Time”, the second should use your close time, and the third should use “Now” (the current date/time). These three columns will give you numeric values that you can use in an if-then-else column:
– If current time value is less than open time value, then false
– If current time value is greater than close time value, then false
– Else true
• If the if-then-else column returns true, then the current time is within your opening window.
4 Likes