Jump to content

Compare dates


Recommended Posts

I'm trying to compare to dates.

CurrentDate = 2016/03/29

SourceDate = 2016/01/10

local $sMonthsBetween = _DateDiff('M', @YEAR & "/" & $aDateSplit[2] & "/" & $aDateSplit[3], _NowCalcDate())

result:
2

Months between gives me "2" and that is ok

local $sDaysBetween = _DateDiff('D', @YEAR & "/" & $aDateSplit[2] & "/" & $aDateSplit[3], _NowCalcDate())

Result
79

Days between gives me "79" and that is not ok.

I would like the result was 19.

How can I do that?

Yours sincerely

Kenneth.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...