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. Advertisements

  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. Advertisements

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,516
    =?Utf-8?B?Sm9obiBTaXZpbGxh?=
    Aug 4, 2004
  2. Chris Berg
    Replies:
    0
    Views:
    1,095
    Chris Berg
    Oct 27, 2003
  3. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,803
    Michael Borgwardt
    May 30, 2004
  4. Keith Cochrane
    Replies:
    2
    Views:
    860
    Keith Cochrane
    Aug 6, 2006
  5. flamesrock
    Replies:
    8
    Views:
    818
    Hendrik van Rooyen
    Nov 24, 2006
  6. Summu82
    Replies:
    5
    Views:
    1,138
    Richard Heathfield
    Jun 7, 2006
  7. David Hearn
    Replies:
    1
    Views:
    536
    David Hearn
    Sep 10, 2003
  8. gil
    Replies:
    1
    Views:
    270
Loading...