I have to display date on page in 'MM/DD/YYY hh:mm:ss tt' format. But I am not able to do it. OccuerdDate is DateTime column with nullable.
I tried following but it is giving error:
@DateTime.ParseExact(item.OccuerdDate, "MM/DD/YYY hh:mm:ss tt",
CultureInfo.InvariantCulture)
Error:
CultureInfo doesn't exist in current context.
I don't know how can I achieve this functionality.