This is a migrated thread and some comments may be shown as answers.

Display in DatetimeColumns

3 Answers 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 28 Mar 2012, 02:17 PM
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.

3 Answers, 1 is accepted

Sort by
0
Accepted
Don
Top achievements
Rank 1
answered on 28 Mar 2012, 08:25 PM
Try using "{0: dd/MM/yyyy}", including the quotes, as your format string.
0
Ivan Petrov
Telerik team
answered on 02 Apr 2012, 09:10 AM
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 >>
0
Thomas
Top achievements
Rank 1
answered on 02 Apr 2012, 10:59 AM
Yes thank you, it's correct, bust just without the quotes.
Tags
GridView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Don
Top achievements
Rank 1
Ivan Petrov
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or