We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Date/Time in DataGrid

Thread ID:





391 Jun 20,2002 01:13 AM UTC Jun 20,2002 07:53 AM UTC WinForms 1
Tags: FAQ
Administrator [Syncfusion]
Asked On June 20, 2002 01:13 AM UTC

I have a simple question. When I bind my datagrid to the data table containing "time" fields with date/time datatype, it only gives me the date. I don't want the date because there are no dates in my database. The time is not appearing!

Clay Burch [Syncfusion]
Replied On June 20, 2002 07:53 AM UTC

If you have added a tablestyle to your datagrid, then you can access the columns's columnstyle in the columnstyle collection member of the tablestyle, and set its Format property. The FAQ referenced below shows how you might do this. You would change the format string to somethiing like "mm:ss t". George Shepherd's Windows Forms FAQ contains an entry entitled: How do I format a date column in a datagrid? Check it out at: http://www.syncfusion.com/faq/winforms/search/867.asp


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon