Filter Date in Excel sheet

I need to filter a column with the current Month in filter activity I wrote the below expression howevery it giving me an error

image

Hi @omar_ismail

Can you share the LHS part which you are trying to compare with?

If you want the month name you can use Now.ToString(“MMMM”)

Hi @omar_ismail

Try this way:

Now.ToString("MM")
or
Now.ToString("MMM")
or
Now.ToString("MMMM")

MM: This will print the present month in number i.e If November 11
MMM: This will print first three letters of the month i.e Nov.
MMMM: This will print the month name i.e November.

Hope it helps!!

image

it’s MM/dd/yyyy format

image
it’s MM/dd/yyyy format

Hi @omar_ismail

Use

Now.ToString("MM")

Regards,

Hi @omar_ismail

How about the following?

DT1.AsEnumerable().Where(Function(row) row.Field(Of DateTime)("Date").Month = DateTime.Now.Month).CopyToDataTable()

I/P:
image

O/P:
image

Hope this helps!!

I need to filter only the date as the BOT will do a lot of things in the same sheet

it gave me the same (Number 11)