DataSet DataTime Binding Issue
-
I have sql (sql server 2005) table which is having StartDate and EndDate datetime columns. <code>StartDate value inserting as 2009-08-11 00:00:00.000, EndDate value inserting as 2009-08-11 23:59:00.000 (End of the day).</code> This DB Server is located at london. in my winforms(2.0) appliction i have typed dataset, is having same table schema. Typeddatasset StartDate and EndDate DateTimeMode property set to UnspecifiedLocal. i am populating this dataset with SP. SP is functioning properly. returned data i am binding to DataGridView. when its biinding to datagridview, <code>StartDate is showing as '8/11/2009 4:30 AM' instead of '8/11/2009 12:00 AM' and EndDate is showing as '8/12/2009 4:29 AM' instead of '8/11/2009 11:59 PM'</code> it seems problem is with databinding to dataset. any sounds?
Ramana
modified on Wednesday, August 12, 2009 4:15 AM
-
I have sql (sql server 2005) table which is having StartDate and EndDate datetime columns. <code>StartDate value inserting as 2009-08-11 00:00:00.000, EndDate value inserting as 2009-08-11 23:59:00.000 (End of the day).</code> This DB Server is located at london. in my winforms(2.0) appliction i have typed dataset, is having same table schema. Typeddatasset StartDate and EndDate DateTimeMode property set to UnspecifiedLocal. i am populating this dataset with SP. SP is functioning properly. returned data i am binding to DataGridView. when its biinding to datagridview, <code>StartDate is showing as '8/11/2009 4:30 AM' instead of '8/11/2009 12:00 AM' and EndDate is showing as '8/12/2009 4:29 AM' instead of '8/11/2009 11:59 PM'</code> it seems problem is with databinding to dataset. any sounds?
Ramana
modified on Wednesday, August 12, 2009 4:15 AM
Ramana. G.V wrote:
This DB Server is located at london.
Where are you? I would guess it's just a time zone issue, that it's adjusting for your local time zone. Some very smart people worked very hard to make it work that way and now you say you want it the other way?
-
Ramana. G.V wrote:
This DB Server is located at london.
Where are you? I would guess it's just a time zone issue, that it's adjusting for your local time zone. Some very smart people worked very hard to make it work that way and now you say you want it the other way?
yes, if you have any other way to do. please help me
Ramana