Unable to compare date

Hey @tamshi

DateTime supports comparison, but first you need to parse the date-time string, DateTime.ParseExact() should.

var dateTimeStr = “16-03-2017”;
var user_time =DateTime.ParseExact(datetimestr, “dd-MM-yyyy”, CultureInfo.InvariantCulture); // parse
var time_now = DateTime.Now.Date; // to get today’s date

now use compare date activity on it.

For assistance see the attached sample workflow.
datetimecomparison.xaml (6.3 KB)

Regards…!!
Aksh

2 Likes