removing the time portion of date field

Discussion in 'ASP .Net' started by Serge Poirier, Nov 8, 2003.

  1. 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
     
    Serge Poirier, Nov 8, 2003
    #1
    1. Advertising

  2. Serge Poirier

    Lyndon Hills Guest

    On Fri, 7 Nov 2003 18:41:26 -0800, "Serge Poirier"
    <> wrote:

    >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);
     
    Lyndon Hills, Nov 8, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robin
    Replies:
    2
    Views:
    6,326
    =?Utf-8?B?Sm9obiBTaXZpbGxh?=
    Aug 4, 2004
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,380
    Michael Borgwardt
    May 30, 2004
  3. Peter Hansen
    Replies:
    0
    Views:
    735
    Peter Hansen
    Feb 22, 2006
  4. Peter Hansen
    Replies:
    0
    Views:
    630
    Peter Hansen
    Feb 22, 2006
  5. gil
    Replies:
    1
    Views:
    180
Loading...

Share This Page