Format Date from Oracle

  • Thread starter Thread starter AZNewsh
  • Start date Start date
A

AZNewsh

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
 
Add the following attribute to your BoundColumn

DataFormatString="{0:MM/dd/yyyy}"
 
Back
Top