I’m trying to extract the newest date from a Datatable using the following expression when assigning to a variable:
ExtractDataTable.AsEnumerable().Max(Function (drRows) If(DateTime.TryParse(drRows.Item(“Column-8”).ToString, Nothing), DateTime.Parse(drRows.Item(“Column-8”).ToString), DateTime.MinValue)).ToString
The expression takes column 8 where dates are stored and checks for the max date in the row, if a row contains a value which is not a date then it passes it as a Min value.
The problem i’m facing is that the expression seems to be handling the date in US format (mm/dd/yyyy) while I need it formatted as (dd/mm/yyyy).
How do I implement a formatting into the expression? If not possible, would it then make sense to use ParseExact and how would that then be done for the same purpose?
Is it then possible to extract from the same row but from a different column?