# Calculate date & time difference

#### Rodrigues

##### Member
Hi All
I am wondering if someone could help me please.
Need to calculate date and time difference between three columns.
The problem I'm facing is that, one of the dates and time are in a separate columns (F&G):
Column F=date
Column G=time (of F)
Column K = date & time together (separate column).
At the moment I'm using an helper "M" column to combine both cells (F&G), but if we could avoid helper column it will be great.
File attached for better explanation.
Any help it will be appreciated.
Regards
R

#### Attachments

• 13.2 KB Views: 8

#### pecoflyer

##### Active Member
Replace f7 with F14+G14 in your formulas

#### Peter Bartholomew

##### Well-Known Member
Don't forget that if
startTime > endTime
then the time difference is given by
= MOD( endTime - startTime, 1 )
to give a positive time interval.
You would also need to subtract 1 from the number of days
= INT( endDate - startDate ) - ( startTime > endTime )

Thank you.