-
Jun 18th, 2007, 04:04 AM
#1
Thread Starter
Lively Member
format date column in datatable
hi,
how can I format a date/time column held in a DataTable. I want to display only the time part of it.
-
Jun 18th, 2007, 04:06 AM
#2
Re: format date column in datatable
You don't. A DataTable should store DateTime values and they have no format. Format is only an issue when converting a DateTime value to a String, which 99 times out of 100 would be done in order to display it. If that is what you want to do then how you format the string depends on how it's being displayed.
-
Jun 18th, 2007, 04:09 AM
#3
Thread Starter
Lively Member
Re: format date column in datatable
well actually I could not find a way to format the date/time column of my database table in the datagrid in my compact framework app. so I thought might as well try to format it in the datatable itself before binding it to the data grid. ya i understand its not right.
well i guess i'll have find an alternative.
any ideas???
Last edited by sunshine123; Jun 18th, 2007 at 04:13 AM.
-
Jun 18th, 2007, 04:28 AM
#4
Re: format date column in datatable
I'm not sure how much the CF supports but column formatting in a DataGrid is usually handled by the DataGridColumnStyle class. Check out this page for heaps of DataGrid information.
-
Jun 18th, 2007, 05:18 AM
#5
Thread Starter
Lively Member
Re: format date column in datatable
OK thanks.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|