converting time to integer

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.
 
P

Pete_UK

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
 
G

Guest

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.
 
P

Pete_UK

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 -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top