I have a dought How to convert today date to compare excel date(What we store in the "Date" Column)

I have a dought How to convert today date to compare excel date(What we store in the “Date” Column)

for an example, I want to read the data from excel and send the data through email who have email id match the today date
Excel is below image
Can anyone tell me how to give condition in If Condition I try some code I get error

Hi,

Can you try Today instead of Now because Now includes hour, minutes and second of just now?

DateTime.ParseExact(Email("Date").ToString,"dd/MM/yyyy",System.Globalization.CultureInfo.InvariantCulture)=Today

Regards,

1 Like

i get an error like this

Hi,

How about the following?

DateTime.ParseExact(Email("Date").ToString.Trim,"d/M/yyyy",System.Globalization.CultureInfo.InvariantCulture)=Today

Is your date of the above screenshot of excel September 4th or April 9th?
If It’s September, need to set "M/d/yyyy"

Regards,

1 Like

Today date only i use the same code but its showing error

Hi,

Can you try the following? The data has hour, minute and second.

DateTime.ParseExact(Email("Date").ToString.Trim,"MM/dd/yyyy HH:mm:ss",System.Globalization.CultureInfo.InvariantCulture)=Today

Regards,

1 Like

Thanks you very much!!!

1 Like

before one month i want to send the mail is it possible compare today date
i want to send mail
e.g Today date sep 9 i want to send the mail to the today date and again i want to send the same mail id after that 30 days is it possible.

Hi,

We can get the day 30 days later using Today.AddDays(30). However, we needs to make something logic to send an email this day.

Regards,

1 Like

Can u please explain what is the logic

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.