OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Calculating differences between two datetime columns

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Math
View previous topic :: View next topic  
Author Message
kissmekate
Newbie
Newbie


Joined: 17 Jun 2010
Posts: 2
Location: Northern California

PostPosted: Thu Jun 17, 2010 9:49 am    Post subject: Calculating differences between two datetime columns Reply with quote

I've read about datediff, but that doesn't work for me because I'm not working with a database, I'm working with a spreadsheet and I need to reference cell numbers for what I'm trying to do.

I have one column with Creation Dates in the format of MM/DD/YY hh:mm. I have one column with Closing Dates in the same format.

Please tell me there is a simple and straightforward way to calculate the difference between the two in hours and minutes.

Please tell me that I don't have to split the dates from the times and calculate them independently.

Thanks!
Back to top
View user's profile Send private message
kissmekate
Newbie
Newbie


Joined: 17 Jun 2010
Posts: 2
Location: Northern California

PostPosted: Thu Jun 17, 2010 10:01 am    Post subject: Reply with quote

Nevermind I think I just confused myself by trying to read the forums too early. Properly formatting each column (particularly the column where the calculation results are presented) seems to allow for straight forward =(Datetime2 - Datetime1)
Back to top
View user's profile Send private message
pitonyak
Administrator
Administrator


Joined: 09 Mar 2004
Posts: 3655
Location: Columbus, Ohio, USA

PostPosted: Thu Jun 17, 2010 10:55 am    Post subject: Reply with quote

Internally, a date/time is stored as a floating point number.


For a time, 0 references midnight December 30, 1899.

The fractional portions indicate time, so 0.5 is halfway through the day, or noon.

This system allows direct math to be used to calculate elapsed time.
_________________
--
Andrew Pitonyak
http://www.pitonyak.org/oo.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Math All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group