How do I parse in multiple datetime format strings into DateTime?

@gerlynn_lxy
find a reworked approach here:
FindDates_MultipleFormats_WithinDateRange.xaml (16.6 KB)

First Stage: Configure the DateFormats inside a DataTable (can be later externalized)
Second Stage: Filter out all dates that are compatible with the configured date formats
Third Stage: Create a report Datatable for all non parseable dates
Fourth Stage: do the filtering

As it is defensive, checks the possibilities of parsing and also is handling empty results the code is now more stable and ready for masses

1 Like