To get only future two weeks date from datatable

Hi All
Im getting the dates from the excel in format like(“dd-MMM-yyyy”) i want to comapare these dates with future two weeks dates and if matches i want to get that dates

Thanks

Hi @pravin_calvin

Refer to below method to get the format string of future two weeks dates, and compare with the dates from Excel file.
Now.AddDays(14).ToString(“dd-MMM-yyyy”)

1 Like

Hi Pravin,

To compare the date please use below logic,

CDate(here you can pass your datetime variable) - CDate(here you can pass your datetime variable).

Thanks, Happy Automation!

1 Like

Thanks for your reply its worked like charm!

1 Like

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