Compare to today date with and column date

Kindly try with this expression in this assign activity inside the for each row loop
Columndate = row(Now.ToString(“dd”))

Cheers @Abubakkar

1 Like

image

1 Like

Yah
Cheers @Abubakkar

1 Like

Thanks @Palaniyappan

but i can’t compare this column name and current date

i want to compare in this column name todaydate (28) and current date (28)

May I know why
@Abubakkar

1 Like

All are correct only.

since i getting this error

May I know what we are trying to check here in the condition once after getting the column name and it’s value in variable columndate
Cheers @Abubakkar

1 Like

I want to compare today’s date with and excel column name is today date (28)

if it is same date then i will go to delete rest of the date columns ex:(29,30,31)
that’s it

1 Like

As per this image Is there any column named currentdate
image
Cheers @Abubakkar

1 Like

yes, current date is 28 so I used System.DateTime.Now.Date.Day.ToString this format.

i want to check column name is current date 28 so i used System.DateTime.Now.Date.Day.ToString this format.

both are same dates so only used same date format.
Maybe it’s wrong
so only i’m getting this error i think

1 Like

Then we can check with this condition whether there is a column of today date in our datatable like this
Dt.Columns.Contains(Now.ToString(“dd”))

Cheers @Abubakkar

1 Like

Pls help me to find this error

Thanks @Palaniyappan,

yes, it’s working fine now.
If matched then
Is this possible can I delete tomorrow column and next columns ?

I want to delete tomorrow column date from this end of the month date.
could you help me date coding format please

1 Like

Yah
Use a assign activity in the THEN part OF above if condition Dt.Columns.Contains(Now.ToString(“dd”))
like this
col_index = dt.Columns.Indexof(Now.ToString(“dd”))

Where col_index is a variable of type int32 defined in the variable panel

Then we can use WHILE LOOP with condition like this
col_index < dt.Columns.Count

—inside the loop use REMOVE DATA COLUMN ACTIVITY where mention the datatable.Columns.Count-2 as input for column index property and mention the datatable as input

Cheers @Abubakkar

1 Like

Kindly try this and let know for any queries or clarification
Cheers @Abubakkar

1 Like

Thanks for the help @Palaniyappan.

1 Like

Cheers @Abubakkar

1 Like

I want to send mail with excel attachment

Where can I attach excel file?

can you help me?

1 Like

Click in the attach file option in the activity
Where we can pass the filepath if that excel as input
Cheers @Abubakkar

1 Like

Hi,
I got this error @Palaniyappan