Datatable iterate through column named 'date'

Hi All,

I am writing a process that checks a job board where if the published date is the same as the current date then it will move onto opening Illustrator. The problem I am having is looping through this column.

This is what I have so far any help would be appreciated :slight_smile:

Hi
we can directly use FOR EACH ROW activity where pass the variable JobPostDataTable variable asinput
inside the loop we can get the value of that column by mentioning as row(“Date”).ToString
and in IF condition like this
Now.ToString(“dd/MM/yyyy”).Contains.row(“Date”).ToString.

Cheers @Stabbathehut

1 Like

Thanks for the prompt response. I am getting the error which is stating contains cannot have this many accessible arguments. In addition, the date is in format “dd/mon/yyyy”; e.g 06/jan/2020

awesome then the IF condition be like this
Now.ToString(“dd/MMM/yyyy”).SubString(0,10).Trim.Contains(row(“Date”).ToString.SubString(0,10).Trim)

Cheers @Stabbathehut

1 Like

Use the same condition as @Palaniyappan has given, just change the format as below:

Now.ToString(“dd/MMM/yyyy”).Contains.row(“Date”).ToString

Sorry to be a pain.

aah sorry that was my typo mistake
just now changed the expression kindly have a view on that

Cheers @Stabbathehut

That’s great thanks! :slight_smile:

1 Like

very sorry, one last thing but how do you get that as an output? The resultant of the if statement I mean? There doesn’t seem to be an output when I do this:

May I know What datatype of output you need from THEN part of IF condition when it gets satisfied
@Stabbathehut

Just as a standard string if possible where it returns the resultant of the if statement

If you want the row value as a string output then use assign activity like this
str_datevalue = row(“Date”).ToString.SubString(0,10).Trim)

Cheers @Stabbathehut

1 Like

I am still not getting an output when using message box or write line

May I know how it was mentioned
If possible a screenshot pls
@Stabbathehut