Issue
Microsoft SQL Server stores date values in fields using datetime data type. Most programmers only need the date section while time is always attatched to the date when it's saved. When the value is read, time shows up right beside the date section.
Solution
Use the following formatting for the column where the date values will be shown:
DataFormatString="{0:MM/dd/YYYY}";
Also remember to disable html encoding for the above field:
HtmlEncode=false;
No comments:
Post a Comment