Check dates

Hello everyone !

I want to check if in the below table there is any date older than 15 days.

Dates
2019-03-21
2019-03-21
2019-03-15
2019-03-21
2019-03-22
2019-02-03

Many thanks in advance !

cdate(β€œValue”)<now.adddays(-15)

2 Likes

You can try this as well

(From x in DatatableVariable.asEnumerable()
where cdate(x(β€œColumnName”)<now.adddays(-15)
select x).count>0

implies there is a date greater than 15 days

1 Like

Date.Parse(β€œ2019-03-21”) < Now.AddDays(-15)
Where in Date.Parse is to convert the String inside the parenthesis to Date Time.

Use this code in Write line Activity to get the result.
(Date.Parse(β€œ2019-03-21”) < Now.AddDays(-15)).ToString

1.You should use for each row (name of data table with all the dates)
2.if activity (with following condition) row - Now() = 15
or this condition row < now.adddays(-15)
dates should be date variables.

Thank you all for your answers!

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