converting date/time into hours

C

CJ

I have 2 fields called open date & close date. I need to
get age.
age=close date-open date
The output should be in hours.(age = number of hours)
 
A

Allen Browne

Create a query into this table.

In a fresh column of the Field row of the query design grid, enter:
Hours: DateDiff("h", [open date], [close date])

Note that this expression looks at the whole hours only. To deal with
fractions of hours, use:
Hours: DateDiff("n", [open date], [close date]) / 60
 

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

Top