converting time to integer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm need a difference in time as minutes for a pivot table. Here's the
problem. I've set a column (difference) as time1 - time2 and formated
difference as [mm] which shows me the correct number of minutes. I need to
convert this column to an integer so that I can group it in a pivot table
meaningfully. I've tried =text(difference, "000") but it doesn't work 483
minutes comes out as .34 blah, blah, blah -- I assuming it's giving me the
fraction of a day. How do I convert the text of the difference column into
an integer in the next column? Thanks Ian.
 
You can do it directly from your time columns as follows:

=ROUND((time1-time2)*24*60,0)

Format the cell as number. Assumes time2 is earlier than time1.

Hope this helps.

Pete
 
thanks Pete -- worked like a charm. Ian.



Pete_UK said:
You can do it directly from your time columns as follows:

=ROUND((time1-time2)*24*60,0)

Format the cell as number. Assumes time2 is earlier than time1.

Hope this helps.

Pete

I'm need a difference in time as minutes for a pivot table. Here's the
problem. I've set a column (difference) as time1 - time2 and formated
difference as [mm] which shows me the correct number of minutes. I need to
convert this column to an integer so that I can group it in a pivot table
meaningfully. I've tried =text(difference, "000") but it doesn't work 483
minutes comes out as .34 blah, blah, blah -- I assuming it's giving me the
fraction of a day. How do I convert the text of the difference column into
an integer in the next column? Thanks Ian.
 
You're welcome, Ian - thanks for feeding back.

Pete

thanks Pete -- worked like a charm. Ian.



Pete_UK said:
You can do it directly from your time columns as follows:

Format the cell as number. Assumes time2 is earlier than time1.
Hope this helps.

I'm need a difference in time as minutes for a pivot table. Here's the
problem. I've set a column (difference) as time1 - time2 and formated
difference as [mm] which shows me the correct number of minutes. I need to
convert this column to an integer so that I can group it in a pivot table
meaningfully. I've tried =text(difference, "000") but it doesn't work 483
minutes comes out as .34 blah, blah, blah -- I assuming it's giving me the
fraction of a day. How do I convert the text of the difference column into
an integer in the next column? Thanks Ian.- Hide quoted text -

- Show quoted text -
 
Back
Top