#  Other Applications & Softwares  > Access Tables & Databases >  >  Query: Difference between date/time columns

## uneek78

I have a database that has columns that include date & time. In a similar excel spreadsheet, I have an additional column that can subtract the difference between those date/time columns and give you the days/hours/minutes left. How can I mimic this in database? I am by far not a program, so please give me something simple if possible.

----------


## Cheeky Charlie

We have a lot in common, I am not a program either.

I understand you are talking about how to subtract date from (date+time) to get times - correct? What do you mean by "database"?  Are you talking about doing this in Access?

CC

----------


## uneek78

I accidentally posted this in an excel forum, I meant to put it in an access forum, but if you know the answer that would be great. I am successful with this in excel. The date/time in 1 columns subtracts itself from the date/time in another column and leaves you with days:hours:minutes. But I can't do this in access.

----------


## DonkeyOte

Thread moved to Access Forum.

----------


## Cheeky Charlie

In Access, my question would be "what for?" you can just display time of date+time with a format (much like Excel).  Creating an extra field to hold this information seems duplicative.
My apologies if I've misunderstood.

CC

----------


## ConneXionLost

Hi uneek78,

If you are referring to the DATEDIF function in Excel, then there is a good article about it here:

DATEDIF

But in Access, you need to use a different version of this function; described here:

DATEDIFF

Hope this helps.

Cheers,

----------

