Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. DataSet DataTime Binding Issue

DataSet DataTime Binding Issue

Scheduled Pinned Locked Moved C#
databasehelpcsharpsharepointsql-server
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VenkataRamana Gali
    wrote on last edited by
    #1

    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

    P 1 Reply Last reply
    0
    • V VenkataRamana Gali

      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

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      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?

      V 1 Reply Last reply
      0
      • P PIEBALDconsult

        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?

        V Offline
        V Offline
        VenkataRamana Gali
        wrote on last edited by
        #3

        yes, if you have any other way to do. please help me

        Ramana

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups