Help

Re: Calculating a date between 2 dates

Solved
Jump to Solution
869 1
cancel
Showing results for 
Search instead for 
Did you mean: 
David_Brunt1
4 - Data Explorer
4 - Data Explorer

I have 2 date fields and would like to calculate the midpoint between the two (as a date). I have tried a few the NGS bit not had any success. Any ideas?

1 Solution

Accepted Solutions
Vivid-Squid
11 - Venus
11 - Venus

Maybe you need to be more accurate than this:

DATEADD(start, DATETIME_DIFF(end, start, 'days')/2, 'days')

Count the number of days between two dates, divide by 2, add that number to the start date.

See Solution in Thread

2 Replies 2
Vivid-Squid
11 - Venus
11 - Venus

Maybe you need to be more accurate than this:

DATEADD(start, DATETIME_DIFF(end, start, 'days')/2, 'days')

Count the number of days between two dates, divide by 2, add that number to the start date.

Thanks. That worked a treat and not something I would have come up with. :slightly_smiling_face: