A
Alec MacLean
Hi,
Tools and target: VS2005 Pro, SQL server 2000, ASP.NET (GridView).
I am trying to get a date field inside a GridView to display without the
time element.
The date field is coming from a SQL DateTime column.
I have set the
<asp:BoundField DataField="DateClose" DataFormatString="{0:dd/MM/yyyy}"
HeaderText="Close Date" />
I have also tried {0:d} and {0
} as alternative formats. None seem to
work.
The date is coming out with the time element included, e.g. "01/12/2006
00:00:00", each time.
Any one got an idea why the format string isn't working in this case?
Thanks
Al
Tools and target: VS2005 Pro, SQL server 2000, ASP.NET (GridView).
I am trying to get a date field inside a GridView to display without the
time element.
The date field is coming from a SQL DateTime column.
I have set the
<asp:BoundField DataField="DateClose" DataFormatString="{0:dd/MM/yyyy}"
HeaderText="Close Date" />
I have also tried {0:d} and {0
![Big Grin :D :D](/styles/default/custom/smilies/grin.gif)
work.
The date is coming out with the time element included, e.g. "01/12/2006
00:00:00", each time.
Any one got an idea why the format string isn't working in this case?
Thanks
Al