Forum Discussion

ahha_ha's avatar
ahha_ha
Copper Contributor
Jan 16, 2024
Solved

converting a general number that includes text into a date/military time format

I can use the formatting and the custom formatting to convert the cells into the date/time format, but the time does not understand the military time because the time is based on AM and PM text at th...
  • Hans_Vogelaar's avatar
    Hans_Vogelaar
    Jan 17, 2024
    You can use PowerQuery to do this. If you prefer a formula: on my PC, this simple formula works:

    =--LEFT(A2, 22)

    Format the cell with the formula as date and time, then fill down. If it fails on your PC:

    =DATE(LEFT(A2, 4), MID(A2, 6, 2), MID(A2, 9, 2))+TIMEVALUE(MID(A2, 12, 11))

    Again, format as date and time, then fill down.

Resources