How to check if a date is within -6 months?

Date is of string format(01-Jun-21) and I want to check if this date is within -6months from today. Can anyone help? Thanks!

Hi @Harsha_Vemula,

boolen = Convert.ToDateTime("01-Jun-21")> now.AddMonths(-6)



Thanks for the quick response.
Actually here, I have a DT where there is only one column and column name is Date and i have one row which will have the date value.
So this row item can be null or can be some date.
Now I want to check If this row item is null or within 6months(-6). How can I build this logic?

1 Like

You’re welcome.

Convert.ToDateTime(CurrentRow("ColumName").ToString)> now.AddMonths(-6) and CurrentRow("ColumName").ToString<>""

If you have separate actions for empty and the other condition, you put an if before and check the fullness first, then enter this condition if it is full.

1 Like

Thanks you so much @muhammedyuzuak :slight_smile:

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