In a excel we have column as numbers need to get the today's date values

In a excel we have column as numbers need to get the today’s date values

I have column name as 1 ,2,3,4,5,-31 with values as Y and N

I need to get today’s date based on values (05)

I tried it with this query still not working

Dt_AssociateName.Select(“Convert(”+Now.ToString(“dd”).ToString.Replace(“0”,"")"=‘Y’").Count>0)

Please help me

Thanks
Ashwin S

Try below code

Dt_AssociateName.Select("["+Now.ToString("d")+"]='Y'").Length>0

1 Like

Hi @arivu96

Cannot find column 06/05/2019
i need it in as 05 instead of month and year

Thanks
Ashwin S

Ashwin if u want 5 use “d” or if u want 05 use “dd”

Hi @arivu96
ll try

Hi Arivu
I am getting the format as06/05/2019 but not converting into 5

Thanks
Ashwin S

Use ToString("℅d")

1 Like

Thanks Arivu its working

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