How to check if current date is in under or equal to 60 days

var_date = 5 jan 2022

how to check if current date is under or equal to 60 days

@manoj_verma1

Check below thread for your reference

Hope this may hep you

Thanks

Use if condition
(DateTime.Now-System.DateTime.ParseExact(var_date,"d MMM yyyy",System.Globalization.CultureInfo.InvariantCulture)).TotalDays<=60

if future date is var_date change condition like below

(System.DateTime.ParseExact(var_date,"d MMM yyyy",System.Globalization.CultureInfo.InvariantCulture)-DateTime.Now).TotalDays<=60
Regards,
Arivu

2 Likes

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