No. 10 before the query data does not show a problem

// The main problem is time screening questions 
// as not convert 2019/12/02 2019/12/2 This problem led


// 1:00 formatted data control is bound date methods:. <ASP: the BoundColumn the DataField = "AddTime" HeaderText = "added" DataFormatString = "{0: yyyy-the mM-dd HH: mm}> </ ASP: the BoundColumn> <ASP: the BoundField the DataField =" AddTime "HeaderText =" added "DataFormatString =" {0: yyyy }-dd -MM "/> // 2 when a data binding DataBinder.Eval:. DataBinder.Eval (Container.DataItem," AddTime "," {0: the MM-dd-YYYY} ") //. 3. date display format for direct conversion method ToString: DateTime.Now.ToString ( "the mM-dd-YYYY HH: mm: SS") . // String class. 4 for converting date display format: the String.Format ( "{0: YYYY- dd}-the MM ", the DateTime.Now) //. 5. The method of converting a date display format DateTime.Parse DateTime.Parse (" 2012-2-22 "). ToString ("the MM-dd-YYYY ") . //. 6 by converting the date display format Convert.ToDateTime Method: Convert.ToDateTime("2012-12-21").ToString("yyyy-MM-dd")

  

Guess you like

Origin www.cnblogs.com/lin02/p/12100493.html