outputData = output.OrderByDescending(x => DateTime.ParseExact(x.modifiedDateTime, "MM/dd/yyyy hh:mm:ss", CultureInfo.InvariantCulture)).ToList();
in the above code x.modifiedDateTime stores date in MM/dd/yyyy hh:mm:ss format and we are ordering using MM/dd/yyyy hh:mm:ss format. But now i want to order using MM/dd/yyyy hh:mm:ss tt(AM/PM) format, how could this be done. also modifiedDateTime should be displayed MM/dd/yyyy hh:mm:ss format
How could this be done. please help on this.

Amit MohantyPosted Apr 14, 2023, 11:02 AM
Naimish MakwanaPosted Apr 14, 2023, 7:07 AM
Try below code:
Thanks
Naimish Makwana