|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Format Date from OracleI am populating a datagrid with a query from Oracle, one column is a
date field which I am populating thus: <asp:BoundColumn DataField="DATE_SENT" HeaderText="DATE SENT"> <ItemStyle HorizontalAlign="Left"></ItemStyle> </asp:BoundColumn> The problem is that it displays as the Oracle default of date time AM/PM where as I only want to see the date like 4/14/2006 How would I convert this? do I do it in the SQL or whilst populating the datagrid and how? Thanks in advance Add the following attribute to your BoundColumn
DataFormatString="{0:MM/dd/yyyy}" Show quoteHide quote "AZNewsh" <g*@dana.ucc.nau.edu> wrote in message news:1145028872.837619.306990@g10g2000cwb.googlegroups.com... >I am populating a datagrid with a query from Oracle, one column is a > date field which I am populating thus: > > <asp:BoundColumn DataField="DATE_SENT" HeaderText="DATE SENT"> > <ItemStyle HorizontalAlign="Left"></ItemStyle> > </asp:BoundColumn> > > The problem is that it displays as the Oracle default of date time > AM/PM where as I only want to see the date like 4/14/2006 > > How would I convert this? do I do it in the SQL or whilst populating > the datagrid and how? > > Thanks in advance >
How to release a free source code?
Dynamically open forms, reports or call functions Copywriting or protecting your program Database update problems. How to convert a regular VB app into a service to run on a Windows 2003 server? Threading a Create Dataset method is there a way to do this Crypto Question String Tokenizing - Help! An idea to save learning time. |
|||||||||||||||||||||||