How do I convert "system" column "Created Date" to military time only (no date)?

Options
Ami Veltrie
Ami Veltrie ✭✭✭✭✭✭
edited 09/19/22 in Formulas and Functions

My intent for doing this is so that I can use the result to calculate the number of hours/minutes between two timestamps.

OR...can it be done without converting to military time?

Answers

  • Paul McGuinness
    Paul McGuinness ✭✭✭✭✭✭
    Options

    HI @Ami Veltrie

    Unfortunately the created column is locked in its formatting but you can extract the time portion from the cell for your calculation using a helper column, something like this?

    The formula for this is:

    =RIGHT(Created@row, 5)

    Hope that helps.

    Thanks

    Paul

  • Ami Veltrie
    Ami Veltrie ✭✭✭✭✭✭
    Options

    @Paul McGuinness I need to convert to military time so that I can subtract start time from end time.

  • Paul McGuinness
    Paul McGuinness ✭✭✭✭✭✭
    Options

    Hi @Ami Veltrie

    You could use the helper column for your calculations or you could use the formula above directly in your calculation to work out the time taken.

    What exactly are you trying to work out from the start and end times?

    is it time taken? and if so in what measurement minutes or minutes and hours?

    Thanks

    Paul

  • Ami Veltrie
    Ami Veltrie ✭✭✭✭✭✭
    Options

    @Paul McGuinness

    We are trying to use Smartsheet as a time tracker. Clock in time, clock out time, and then calculate the number of hours worked.

    First I am having to change the timestamp "Time (Helper)" to military, so that it will result in minutes, then changing back to hours in the "Hours" column.

    Here's the formula in "Timestamp In (Military)" column:

    =((VALUE(LEFT([Time (Helper)]@row, FIND(":", [Time (Helper)]@row) - 1)) - IF(VALUE(LEFT([Time (Helper)]@row, FIND(":", [Time (Helper)]@row) - 1)) = 12, 12, 0) + IF(RIGHT([Time (Helper)]@row, 2) = "pm", 12, 0)) + MID([Time (Helper)]@row, FIND(":", [Time (Helper)]@row) + 1, 2))

    Here's the formula in the "Minutes" column.

    =((VALUE(LEFT([TEMP Timestamp Out (Military)]@row, 2)) + VALUE(RIGHT([TEMP Timestamp Out (Military)]@row, 2)) / 60) - (VALUE(LEFT([Timestamp In (Military)]@row, 2)) + VALUE(RIGHT([Timestamp In (Military)]@row, 2)) / 60)) * 60

    The formula works when the "Timestamp In (Military)" is "PM" (four digits), but not when it's "AM" (three digits).


Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!