Short date format in template column?

Discussion in 'ASP .Net Datagrid Control' started by clucherini@gmail.com, May 18, 2006.

  1. Guest

    I have a template column in an asp.net datagrid that shows dates. In
    Access, it's formatted as a date/time column with a short date format.
    When it displays in the datagrid, it always has that awful 12:00:00 AM
    afterward. Is there any way to get around this and keep it as a
    template column?
     
    , May 18, 2006
    #1
    1. Advertising

  2. I'm imagine that your using a label tag to show the date,

    <asp:Label runat="server" id="lblDate" Text='<%# Eval("dateColumn", "{0:f}")
    %>' />

    MSDN Library:
    http://msdn2.microsoft.com/en-US/library/fht0f5be.aspx

    4GuysFromRolla article
    http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=181

    --

    Bruno Alexandre
    (a Portuguese in KĂžbenhanv, Danmark)


    <> escreveu na mensagem
    news:...
    >I have a template column in an asp.net datagrid that shows dates. In
    > Access, it's formatted as a date/time column with a short date format.
    > When it displays in the datagrid, it always has that awful 12:00:00 AM
    > afterward. Is there any way to get around this and keep it as a
    > template column?
    >
     
    Bruno Alexandre, May 19, 2006
    #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. Brian Candy
    Replies:
    2
    Views:
    1,179
    Janaka
    Feb 18, 2004
  2. MattB
    Replies:
    3
    Views:
    982
    rviray
    Aug 11, 2005
  3. Henry Lee
    Replies:
    3
    Views:
    665
    Karl Seguin [MVP]
    Mar 28, 2006
  4. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,301
    Michael Borgwardt
    May 30, 2004
  5. cindy
    Replies:
    1
    Views:
    353
    Steven Cheng[MSFT]
    Apr 20, 2006
Loading...

Share This Page