How to subtract a date from a cell in Excel from today's date

Trying to write a super simple bot that basically says,
"If (today’s date) - (a date from a cell in Excel) > 90 … "
End goal is to send a promotional email to customers who haven’t purchased in 3 months.

So, it would be (today’s date) - (Column titled “Last_Purchase”)

Thank you!

You use the compareto method as explained in the link.

DateTime.CompareTo Method (System) | Microsoft Learn

You need to convert your Excel sheet value as date format for that you can use cdate(value in string)
Then you can achieve your

1 Like