Using date difference for conditional

I’m a new Julia user and feeling really dumb here because Dates are absolutely killing me. I just want to do something like
if (Date1-Date2)>1 # to represent the difference is than 1 day.
do something
else

My problem is that I cant work out how to convert the result of Day1-Day2 to an integer because Date1-Date2 returns “x Days”, clearly not an integer.

Any hints much appreciated.
Thanks
Steve

You can use:

if Date1-Date2 > Day(1)
5 Likes

thanks heliosdrm.