Please help me find a solution for this problem.
I extract from a website this value which is date but with a strange format (dd-MM-yyyy) :
I need to format this date and compare it in a if activity with the “today” date minus 60 days.
I managed to find a solution with the today date minus 60 (
) but when I put the extracted value in a If statement something isn’t working.
Please help me,
Assuming your date is always in the same dd-MM-yyyy format, you can convert your string to a System.DateTime variable
dateCellValueExtracted using an assign
dateCellValueExtracted = date.ParseExact(CellValueExtracted, “dd-MM-yyyy”, system.Globalization.CultureInfo.CurrentCulture)
and from there you can use it in your if statement:
dateCellValueExtracted > Today.AddDays(-60)
as they are now of the same type and comparison is allowed.
Hope this helps!
Use this condition inside if
(Date.ParseExact(cellValueExtracted, “dd/MM/yyyy”, System.Globalization.DateTimeFormatInfo.InvariantInfo))>(Date.ParseExact(DateI60, “dd/MM/yyyy”,
November 29, 2022, 11:41pm
Can you try the following condition?
November 30, 2022, 4:34am
Can you try like this in the If activity
Extract date from a date and time
Formula 1: =INT(B3)
Formula 2: =TRUNC(B3)
Thank you very much. It works
December 3, 2022, 11:29am
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.