Thanks Samir and others
I tried the above solution but still getting the same issue
So i decided to loop through the datatable and extract one date at a time and then add it to a list before finally checking the Max like List.Max.toString
I did notice when i was looping through my date data had 2 different formats (dd/mm/yyyy and dd/mm/yyyy hh:mm:ss)
Looking at the source data in excel, all the dates are in correct format (dd/mm/yyyy)
I have no idea how this could be, anyone?
I had to check the format of the date for each row before applying:
I also noticed that it only works with MM/dd/yyyy and not dd/MM/yyyy