c# - formatting datetime column in a DataSet -


I have a dataset that reads the Excel file and has a population. Dataset stores data from Excel

Dataset has to be dated in 2 \ 2 \ 2009 12:00:00 AM but I need to change the data format 2 \ 2 \ 200 I want to change the format of all the data in that specific column.

Here's a way:

  foreach (DataRow in line yourDataTable ) {DateTimeDT = DateTime.Pres (line ["date"] .toastring ()); Line ["date"] = dt.ToShortDateString (); }  

It is assuming that the "Date" column is already a text field rather than a date time field.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -