siva nagarjuna

siva nagarjuna

  • 2.1k
  • 26
  • 13.4k

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

Aug 24 2016 12:47 AM

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)