Re: formatting date on datagrid to get rid of time

Discussion in 'ASP .Net' started by CT, Jul 31, 2003.

  1. CT

    CT Guest

    Hmm, how does the label work with the DataGrid? Anyway, what does the label
    look like, if not associated with the DataGrid? Will it display the date
    only? Please note that the formatting of dates and times are dependant on
    the culture setting of the page or the Web.config file.

    --
    Carsten Thomsen
    Enterprise Development with Visual Studio .NET, UML, and MSF
    http://www.apress.com/book/bookDisplay.html?bID=105
    "SpamProof" <> wrote in message
    news:...
    > My datagrid column keeps displaying "1/1/0001 12:00:00 AM".
    >
    > I need only the date.
    >
    > below is my code that retrieves the date
    >
    > <asp:Label id="Label20" CssClass="InputField" runat="server" Text='<%#
    > DataBinder.Eval(Container, "DataItem.CovPeriodFrom", "{0:d}")%>'>
    > </asp:Label>
    >
    > what could be wrong?
    >
    > -8957078
     
    CT, Jul 31, 2003
    #1
    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. Jim in Arizona

    Can't get rid of the time part of a date

    Jim in Arizona, Jan 5, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    510
    Craig Deelsnyder
    Jan 5, 2006
  2. Chris Berg
    Replies:
    0
    Views:
    830
    Chris Berg
    Oct 27, 2003
  3. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,333
    Michael Borgwardt
    May 30, 2004
  4. jj297
    Replies:
    17
    Views:
    607
    jj297
    Mar 16, 2010
  5. David Hearn
    Replies:
    1
    Views:
    433
    David Hearn
    Sep 10, 2003
Loading...

Share This Page