String changes to date

2 posts, 0 answers
  1. Ryan Morgan
    Ryan Morgan avatar
    26 posts
    Member since:
    Dec 2006

    Posted 13 May Link to this post

    Good day,

    In the spreadsheet control any time you type a string that resembles a date or time, the format for the cell changes to Date.

    For instance, if you go to the DataSource Binding demo at and type 10:00 PM in the ProductName column the current date will be displayed in the cell. If you type 10-10-10 it will be changed to 10/10/2010. If you type 10:99 it gets changed to 11:39.

    So with a spreadsheet that is bound to a datasource. How do you force a column to keep the input string as a string?

    Thanks and Regards


  2. Bozhidar
    Bozhidar avatar
    1095 posts

    Posted 17 May Link to this post


    In order to force the value of the cell to be read as a string, you have to preface it with a ' symbol. For instance if you write '10:00 PM the value will be shown as you expect.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET AJAX banner
Back to Top