none
ListObject bound to DataTable with DateTime column shows 41654 when 2014-01-15 entered RRS feed

  • Question

  • I have a Document level project that has a Dataset generated by Dataset Designer.  This dataset has a DateTime column.  A ListObject hast been created on a worksheet by dragging the DataTable from the DataSource window onto the worksheet. When I edit the cell bound to the DateTime DataTable column with '2014-01-15' it shows 41654.  I have tried to enter other input formats like 01-01-2014 and 41640 shows in the cell after pressing <ENTER>. How can I change it so that does not change what I entered? 

    Thursday, April 24, 2014 4:29 PM

Answers

  • Hi dlk6248,

    I tested according to your description, and failed to reproduce your problem. When I dragged the DataTable into the worksheet, a ListObject is created by default, when I entered a date 01-01-2014 into the DateTime column, it shew the right date.

    By default, the cell format of the DateTime column is Date, I think you must change the cell format to Number. Please follow these steps to change it back to Date.

     In the Visual Studio editor, open the excel worksheet from the project, find the DateTime column, right click it, choose "Format Cells".

    Then the format to Date:


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, April 25, 2014 12:28 PM
    Moderator