Display in DatetimeColumns

4 posts, 1 answers
  1. Thomas
    Thomas avatar
    34 posts
    Member since:
    Nov 2011

    Posted 28 Mar 2012 Link to this post

    Hello,


    In my RadGridViews>Datatime columns, the datetime are display like this for example 28/03/2012 00:00:00 .
    I would like them not to display time.

    I've tried to set the formatstring as "dd/MM/yyyy" in the columns properties but then in the column cells it was displayed dd/MM/yyyy, I mean litterally dd/MM/yyyy, not the the date.

    So, what am I doing wrong ?


    Thank you for support.
  2. Answer
    Don
    Don avatar
    60 posts
    Member since:
    Aug 2010

    Posted 28 Mar 2012 Link to this post

    Try using "{0: dd/MM/yyyy}", including the quotes, as your format string.
  3. Ivan Petrov
    Admin
    Ivan Petrov avatar
    705 posts

    Posted 02 Apr 2012 Link to this post

    Hello Thomas,

    Thank you for writing.

    Don's solution is correct. The format string should be - "{0:dd/MM/yyyy}" where the "0" is a place holder for the cell value. This will make your cells look the way you want the to.

    I hope this will be useful for you. Should you have further questions, I would be glad to help.

    Regards,
    Ivan Petrov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  4. Thomas
    Thomas avatar
    34 posts
    Member since:
    Nov 2011

    Posted 02 Apr 2012 Link to this post

    Yes thank you, it's correct, bust just without the quotes.
Back to Top