Forum Discussion

Stonelaughter's avatar
Stonelaughter
Copper Contributor
Jun 13, 2025

The Dreaded "Duration" bug

Hi!

I have today created an Excel file (from CSV) using data from our core system which deals with login/logout dates and times, and then durations based on the system usage in between.

I have done the necessary splitting of date/time fields into date fields and time fields; and all the source data is formatted as "Text" so appears like floating point numbers.

When I pivot the data, it retains the text format.

 

I then select the body of the pivot table, and set the format to {CUSTOM} [hh]:mm:ss which SHOULD be a bare "duration" style format. It displays as that in the pivot table - but if I select on some of the cells, in the formula bar it displays DD/MM/YYYY HH:MM:SS format. On others, it retains the duration without a date.

It's infuriating. When I check "Format Cells" no date codes are present; and yet here they are in the formula bar. This means that when I try to USE the data, it is garbage - I get no useful results.

 

I'm stuck. I can't proceed. How do I fix this? Is it an Excel bug?

2 Replies

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    Hi

    Any duration greater 23:59:59 will be displayed as a date-time format in the formula bar.

     

    • Stonelaughter's avatar
      Stonelaughter
      Copper Contributor

      Irritatingly this isn't "it". It's displaying date-time for (for instance) 01:27:44 and using the date in calculations based on that cell.

Resources