Subtracting two dates

1
I'd like to know the difference of days between two dates but maintain whether the result is positive or negative. As I understand it, the dayBetween function will only give me absolute values correct? Any way to accomplish this?   ex. 1/23/17 - 1/25/17 = -2 days
asked
1 answers
4

Probably something like:

if 

$date1 < $date2

then 

-1 * (daysBetween ($date1,$date2))

else 

(daysBetween ($date1,$date2))

answered