In an SQL database I have a stored date field as a test property that is in the following format:
dd / mm / yyyy hh: mm: ss (For example, text appears in the field: 28/04/2009 19:15:15)
I have built a datagroup view in the database through GUI in VS2008. So basically all the codes were automatically generated for me when I started my app. The database reads and displays all the rows in the DataGrid view. I can sort on all the columns except the date column. I suspect this because the Data Gridview thinks that the date column is just plain text. How do I work, like I want?
UPDATE As far as I know that any DATE type is in sqlite, I must store it as text < P> UPDATE user wants to see the date in the DD / MM / YY format. Thank you. There are several implementations of the sortable binding list that you can get on the Internet, one of which is also from MSDN. This blog can help you use known datatages and get the right sorting without worrying about the correct format format string. The only requirement is to convert the date string from DB to a date time in its bound object system.
Comments
Post a Comment