Date Time question

Discussion in 'ASP .Net Datagrid Control' started by mark, Nov 22, 2005.

  1. mark

    mark Guest

    Hello

    I search SQL DB and display results to an APS.Net page using <asp:repeater
    />

    One of the columns is a Date in the Database SmallDate .

    When I display it the page it shows Date and Time. How can I get rid of Time
    and have only date displayed.

    All help is greatly appreciated.

    Mark
     
    mark, Nov 22, 2005
    #1
    1. Advertising

  2. mark

    Elton Wang Guest

    If you are using DataBinder.Eval method, you can pass third parameter,
    format string:

    DataBinder.Eval(Container.DataItem, "DateTime_field", "{0:MMM dd yyyy}")

    HTH


    "mark" <> wrote in message
    news:%...
    > Hello
    >
    > I search SQL DB and display results to an APS.Net page using <asp:repeater
    > />
    >
    > One of the columns is a Date in the Database SmallDate .
    >
    > When I display it the page it shows Date and Time. How can I get rid of
    > Time and have only date displayed.
    >
    > All help is greatly appreciated.
    >
    > Mark
    >
     
    Elton Wang, Nov 22, 2005
    #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. Chris Berg
    Replies:
    0
    Views:
    794
    Chris Berg
    Oct 27, 2003
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,271
    Michael Borgwardt
    May 30, 2004
  3. Keith Cochrane
    Replies:
    2
    Views:
    625
    Keith Cochrane
    Aug 6, 2006
  4. flamesrock
    Replies:
    8
    Views:
    470
    Hendrik van Rooyen
    Nov 24, 2006
  5. Summu82
    Replies:
    5
    Views:
    867
    Richard Heathfield
    Jun 7, 2006
Loading...

Share This Page