5
Answers

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

Photo of siva nagarjuna

siva nagarjuna

8y
2.2k
1

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)