LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 9 Feb 2005 17:56:25 EST
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Dale Howe <>
Subject:      Re: MS-Access question
Comments: To: sxa6137@BJC.ORG
Content-Type: text/plain; charset="US-ASCII"

In a message dated 2/9/2005 12:01:02 P.M. Eastern Standard Time, sxa6137@BJC.ORG writes:

Hello group! Sorry for asking a non-spss related question. I am creating a database and I want to do some calculations using dates and times. For example: I want Access to automatically calculateTotal Pump time when the data entry person enters Pump on time and Pump off time.

Can anyone help me how to do that.

Once again sorry for asking NON-SPSS question. Thanks, Shimy.

MS Access makes this really easy. Despite what you see displayed in Access or Excel, what is stored is called a serial date. It is the number of days and decimal fractions of a day since Jan 1, 1900. To test this, format (format controls how you see it, not what is stored) a date as a number, noon on Jan 1, 1900 would be 0.5 or half a day just as 12:00 pm would be, since times without a specified date are assumed to be on Jan 1, 1900.

Subtract one date from another or add a date to a time, and make sure you format the result as a number. The result is pretty simple.

I would suggest you test some values in Excel. Quicker to play with and the rules are the same once you switch to Access.

might want to do some web searches for details on the use of the DateDiff function in Access. Not documented in all version of Access, but it seems to work in all versions and does exactly what you are asking.


Dale K. Howe, PhD Rockford, MI

Back to: Top of message | Previous page | Main SPSSX-L page