Date is present or not in datatable

I need to check whether the end date in datatable is present or not without using for loop condition

Hi @sruthesanju ,

Can you pls provide us the sample or attach screenshot of Input Data and expected Output.

1 Like

Hi @sruthesanju

Can you provide us input and expected output. We can help you with condition.

Regards

1 Like

@sruthesanju

Please provide the input and output

1 Like

@sruthesanju ,

Probably you are looking for this.

Replace dt with your DataTable variable & StartDate with your end date's present in DataTable Column Name

Thanks,
Ashok :slight_smile:

1 Like

@sruthesanju

bascially we use this expression which gives output as boolean

dt.AsEnumerable.Any(Function(a) datetime.ParseExact(a("ColumnName").ToString,"dd/MM/yyyy",system.Globalization.CultureInfo.InvariantCulture).Equals(cdate(inputstr)))
1 Like

What is the dtmToCheck

1 Like

@sruthesanju

it is your input value to check