removing the time portion of date field

  • Thread starter Thread starter Serge Poirier
  • Start date Start date
S

Serge Poirier

Good Day Folks,

I'm displaying a date field from an Oracle table in a
datagrid with the following template.

<ItemTemplate>
<asp:Label id="hiredate" runat="server"
Text='<%# DataBinder.Eval
(Container.DataItem,"hiredate","{0:d}") %>'>
</asp:Label>
</ItemTemplate>

Does anyone know which date/time formatting string would
remove the time portion of the field ?

Thanks in advance
/serge
 
Good Day Folks,

I'm displaying a date field from an Oracle table in a
datagrid with the following template.

<ItemTemplate>
<asp:Label id="hiredate" runat="server"
Text='<%# DataBinder.Eval
(Container.DataItem,"hiredate","{0:d}") %>'>
</asp:Label>
</ItemTemplate>

Does anyone know which date/time formatting string would
remove the time portion of the field ?

Thanks in advance
/serge
Why not remove it when you retrieve the date from oracle? SELECT
TRUNC(date_col);
 
Back
Top