Format Date C#

Asked

Viewed 43 times

3

Format Date

I receive 2017-06-13 from the database, using the code:

Dia = sqlDataReader["DESCRICAO"].ToString(),

I would like to show 13/06/2017, how can I do this formatting?

  • Your field returns a date or string?

  • Field returns a String.

  • take a look at Link that marked as duplicated, la you will find the answer!

  • yourVariable = Datetime.Parseexact(dataParaSerFormated), "dd/MM/yyyy", Cultureinfo.Invariantculture). Date;

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.