Then use (From z In DT1 Where Not String.IsNullOrEmpty(z(18).ToString) And DateTime.ParseExact(z(18).tostring, “yyyy/MM/dd”,System.Globalization.CultureInfo.InvariantCulture) > Date.Now.AddDays(-41)Select z).CopyToDataTable
Now show me this error Assign: String was not recognized as a valid DateTime
And tell mi that Expected an ‘)’ i’m gonna try find a solution for that ‘)’ … what do you thinks Mr.Vivek?
(From z In DT1 Where Not String.IsNullOrEmpty(z(18).ToString) And DateTime.ParseExact(z(18).tostring, “yyyy-MM-dd”,System.Globalization.CultureInfo.InvariantCulture) > Date.Now.AddDays(-41)Select z).CopyToDataTable
(From z In DT1 Where (Not String.IsNullOrEmpty(z(18).ToString) And DateTime.ParseExact(z(18).tostring, “yyyy-MM-dd”,System.Globalization.CultureInfo.InvariantCulture) > Date.Now.AddDays(-41)).Select(z).CopyToDataTable
its missing the first “(” close “)”
Guess its supposed to be like this (From z In DT1 Where (Not String.IsNullOrEmpty(z(18).ToString) And DateTime.ParseExact(z(18).tostring, “yyyy-MM-dd”,System.Globalization.CultureInfo.InvariantCulture) > Date.Now.AddDays(-41)).Select(z)).CopyToDataTable