Calculation on 2 dates

I would like to do calculation on 2 dates as below but I’m not sure whether it’s run. Pls Help. I was doubt the below.

@If(@Text(date2) - @Text(date1)>7

Subject: RE: calculation on 2 dates

You can’t subtract text from text.

date2 - date1 gives a difference measured in seconds.