locked
Date field in detailsview. RRS feed

  • Question

  • User-1759624489 posted

     Hello, Finally I made it work the DateAjaxCalendar with dynamic data futures.

     

    Everything is working except for one thing.

     

    When I click edit on the gridview and it passes the info to the detailsview, The date field says something like this:

    91/12/2008 12:00:00 AM

     

    I want to remove the time part.

     

    Please help

     

     

    Monday, September 15, 2008 5:19 PM

Answers

  • User-330204900 posted

    In your metadata use this attribute on your date fields

    [DataType(DataType.Date)]

    OR

    [DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]

    Hope this helps [:D]

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 16, 2008 1:51 AM

All replies

  • User1491356988 posted

     User string formatting like Bind(data,"{0:d}")

    Monday, September 15, 2008 6:19 PM
  • User-330204900 posted

    In your metadata use this attribute on your date fields

    [DataType(DataType.Date)]

    OR

    [DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]

    Hope this helps [:D]

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 16, 2008 1:51 AM