Date format

  • Thread starter Thread starter Barel Yoav
  • Start date Start date
B

Barel Yoav

When I bing data from SQL Servert DB to textbox it's display the date filed
with strange format.
How can I format the dates field when I bind dataset to a control ?
 
Use data-binding expression with format string like this:

<asp:TextBox id=textBoxForDate runat="server" Text='<%#
DataBinder.Eval(myDataSet, "Tables[myTable].DefaultView.[0].BeginDate",
"{0:yyyy-MMMM-dd}") %>'></asp:TextBox>

Eliyahu
 
Back
Top