Convert datatable date into dd/mm/yyyy format in asp.net

ash060

I have a datatable in which I want to get the date in dd/mm/yyyy format.

Currently I get date like

02-01-2012 12:00:00 AM

Below is my code

strInvoice_date = dt.Rows[i]["INVOICE_DATE"].ToString();
Dmitry Bychenko

Convert and then represent as you want:

  strInvoice_date = Convert.ToDateTime(dt.Rows[i]["INVOICE_DATE"]).ToString("dd/MM/yyyy");

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related