Sorting time Blocks

mahmadi
mahmadi ✭✭
edited 10/26/23 in Formulas and Functions

Hello,

can you please advise me on how to write these time blocks so they can be sorted based on time? we do not want to use 24 hr format. the number before each time block is representative of the quarter in each hour. so for example 1- is 5 to 5:15 and 2- is 5:15 to 5:30. we really need to enable sorting on this . thanks all

@Paul Newcome @Genevieve P.

1 - 5:00 AM PT - 6:00 AM PT

2 - 5:00 AM PT - 6:00 AM PT

3 - 5:00 AM PT - 6:00 AM PT

4 - 5:00 AM PT - 6:00 AM PT

1 - 6:00 AM PT - 7:00 AM PT

2 - 6:00 AM PT - 7:00 AM PT

3 - 6:00 AM PT - 7:00 AM PT

4 - 6:00 AM PT - 7:00 AM PT

1 - 7:00 AM PT - 8:00 AM PT

2 - 7:00 AM PT - 8:00 AM PT

3 - 7:00 AM PT - 8:00 AM PT

4 - 7:00 AM PT - 8:00 AM PT

1 - 8:00 AM PT - 9:00 AM PT

2 - 8:00 AM PT - 9:00 AM PT

3 - 8:00 AM PT - 9:00 AM PT

4 - 8:00 AM PT - 9:00 AM PT

1 - 9:00 AM PT - 10:00 AM PT

2 - 9:00 AM PT - 10:00 AM PT

3 - 9:00 AM PT - 10:00 AM PT

4 - 9:00 AM PT - 10:00 AM PT

1 - 10:00 AM PT - 11:00 AM PT

2 - 10:00 AM PT - 11:00 AM PT

3 - 10:00 AM PT - 11:00 AM PT

4 - 10:00 AM PT - 11:00 AM PT

1 - 11:00 AM PT - 12:00 PM PT

2 - 11:00 AM PT - 12:00 PM PT

3 - 11:00 AM PT - 12:00 PM PT

4 - 11:00 AM PT - 12:00 PM PT

1 - 12:00 PM PT - 1:00 PM PT

2 - 12:00 PM PT - 1:00 PM PT

3 - 12:00 PM PT - 1:00 PM PT

4 - 12:00 PM PT - 1:00 PM PT

1 - 1:00 PM PT - 2:00 PM PT

2 - 1:00 PM PT - 2:00 PM PT

3 - 1:00 PM PT - 2:00 PM PT

4 - 1:00 PM PT - 2:00 PM PT

Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    You could take the hour followed by the number as a decimal in a helper column and then sort on the helper column.


    =VALUE(MID([Column Name]@row, 5, FIND(":", [Column Name]@row) - 5) + "." + LEFT([Column Name]@row)) + IF(AND(FIND("PM", [Column Name]@row> 0, MID([Column Name]@row, 5, FIND(":", [Column Name]@row) - 5) <> "12"), 12, 0)

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!