5
Answers

Convert datetime2 to string(“dd/MM/yyyy”)


i have a datetime2 column in the database.I'm trying to fetch that from database and
I want to display it in the view as string.


i tried: dt.ToString("dd/MM/yyyy");


But it gave an error.
Answers (5)