Forum Discussion

anwarsafian's avatar
anwarsafian
Copper Contributor
Oct 21, 2023

Date and Time to Time Range Formulas

Hi expert

 

I would like to know what is formula to group the time range as shown in below table regardless what the date is.

 

Date and TimeTime Range
7/31/23 9:29:58 AM9-10 AM
7/31/23 1:56:00 PM1-2 PM
8/1/23 9:11:43 AM9-10 AM
8/3/23 5:38:44 PM5-6 PM
8/4/23 3:39:13 PM3-4 PM

 

I tried below formula but it never worked

=IF(           AND(       H3>DATEVALUE("1/1/1900"),H3<DATEVALUE("1/1/2100")        ),

                 IF(    AND( H3>=TIMEVALUE("09:00:00"),H3<TIMEVALUE("10:00:00")    ),  "9-10 am", "else"   ), "false"

      )

3 Replies

Resources