Re: Subtracting date and time values
From: Tom Ellison (tellison_at_jcdoyle.com)
Date: 03/24/04
- Next message: Ripper: "Lazy Teacher"
- Previous message: PIZANO: "Output query to template"
- In reply to: Calvin Shane: "Subtracting date and time values"
- Next in thread: Calvin: "Re: Subtracting date and time values"
- Reply: Calvin: "Re: Subtracting date and time values"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 24 Mar 2004 00:24:43 -0600
Dear Calvin:
How about using Datediff to get the difference in minutes, and divide
by 60, or in seconds and divide by 3600? Then you'd have hours with a
decimal point. Taking the integer and fraction parts of this, you'd
have hours and fractions of an hour. Multiply the fraction by 60 and
get minutes, with decimals again.
Should not be hard to do.
Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
On Tue, 23 Mar 2004 22:08:03 -0800, "Calvin Shane"
<anonymous@discussions.microsoft.com> wrote:
>My client is using Access to provide dates and times on
>equipment failures (using Date and Time opened as one
>field, and date and time closed as one field (date and
>time separated by a space, in the following format:
>
>Date closed field is mm/dd/yyyy hh:mm AM/PM
>Date opened field is same as above.
>
>Instead of using Excel (currently), he wants Access to
>produce Mean Time Between Failures (MTBF), which is the
>date/time closed of the next record, minus date/time
>opened of the previous record (record -1), and produce
>result in the line of previous record, and so on. MTBF
>will not be produced for the 1st record, but will
>thereafter. I've learned about using "Datediff", but
>currently have no PC with Access to test it. With these
>formats, is it possible using "Datediff" to produce a
>result in hours/minutes or hours.hundredth hours (like
>1.2 hours)?
- Next message: Ripper: "Lazy Teacher"
- Previous message: PIZANO: "Output query to template"
- In reply to: Calvin Shane: "Subtracting date and time values"
- Next in thread: Calvin: "Re: Subtracting date and time values"
- Reply: Calvin: "Re: Subtracting date and time values"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|