[Solved] Converting a time stamp into decimal hours?

Discuss the spreadsheet application
Post Reply
clandis2
Posts: 4
Joined: Thu Dec 02, 2010 6:47 pm

[Solved] Converting a time stamp into decimal hours?

Post by clandis2 »

I tried a search and could not find this.

I have a timesheet program on my Palm Pilot that returns an elapsed time in the format HH:MM:SS AM. Is there a way to take this and convert it to decimal hours, such as HH.HH?

Thanks for any help.
Last edited by clandis2 on Thu Dec 02, 2010 11:12 pm, edited 2 times in total.
OpenOffice 3.2.1 on Windows7
User avatar
Charlie Young
Volunteer
Posts: 1559
Joined: Fri May 14, 2010 1:07 am

Re: Converting a time stamp into decimal hours?

Post by Charlie Young »

clandis2 wrote:I tried a search and could not find this.

I have a timesheet program on my Palm Pilot that returns an elapsed time in the format HH:MM:SS AM. Is there a way to take this and convert it to decimal hours, such as HH.HH?

Thanks for any help.
Assuming the elapsed time is the usual sort of spreadsheet time value, with the integer portion being the date and the fractional portion being the time, just multiply the fractional portion by 24 and format it as 00.00. That is (timevalue - INT(timevalue)) times 24. If there is no date portion, you don't need to do the subtraction, but since then the INT part would be zero, it shouldn't matter.
Apache OpenOffice 4.1.1
Windows XP
clandis2
Posts: 4
Joined: Thu Dec 02, 2010 6:47 pm

Re: Converting a time stamp into decimal hours?

Post by clandis2 »

Thank you! I was expecting something much more complicated!
OpenOffice 3.2.1 on Windows7
clandis2
Posts: 4
Joined: Thu Dec 02, 2010 6:47 pm

Re: Converting a time stamp into decimal hours?

Post by clandis2 »

Now, how do I mark this as "Solved"?
OpenOffice 3.2.1 on Windows7
User avatar
Hagar Delest
Moderator
Posts: 33675
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Converting a time stamp into decimal hours?

Post by Hagar Delest »

You've to manually add '[Solved]' at the beginning of your first post title (edit button).
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
clandis2
Posts: 4
Joined: Thu Dec 02, 2010 6:47 pm

Re: [Solved] Converting a time stamp into decimal hours?

Post by clandis2 »

Thank you Hagar!
OpenOffice 3.2.1 on Windows7
Post Reply