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. DataViewGrid and dates

DataViewGrid and dates

Scheduled Pinned Locked Moved C#
databasecssoraclehelp
4 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.
  • C Offline
    C Offline
    crzyank
    wrote on last edited by
    #1

    Hi, I have DataGridView in my application connecting to Oracle DB. Oracle table has a date as '03/12/2007' and same is returned to the front end via DataSet. However when this dataset is bound to the grid, the date displayed is '03/11/2007'!!! Similarly all the dates that have two (2) digit days (from 10 to 31) are reduced by a digit! e.g. instead of '03/30/2007' it shows '03/29/2007'. If I do not use any formatting for the .DefaultCellStyle property then the date displayed is '03/11/2007 11:00 PM'. Dates with single digit days i.e. '03/08/2007' stays the same though - with or without formatting. Please note that my SQL statement truncates the date to short date format - TRUNC(pay_date) - already. Any help is really appreciated. Thanks. crzYank

    F 1 Reply Last reply
    0
    • C crzyank

      Hi, I have DataGridView in my application connecting to Oracle DB. Oracle table has a date as '03/12/2007' and same is returned to the front end via DataSet. However when this dataset is bound to the grid, the date displayed is '03/11/2007'!!! Similarly all the dates that have two (2) digit days (from 10 to 31) are reduced by a digit! e.g. instead of '03/30/2007' it shows '03/29/2007'. If I do not use any formatting for the .DefaultCellStyle property then the date displayed is '03/11/2007 11:00 PM'. Dates with single digit days i.e. '03/08/2007' stays the same though - with or without formatting. Please note that my SQL statement truncates the date to short date format - TRUNC(pay_date) - already. Any help is really appreciated. Thanks. crzYank

      F Offline
      F Offline
      Frank Kerrigan
      wrote on last edited by
      #2

      You could try and just use text straight from Oracle and use it as string. If you are using a strong typeing thi might not be possible.

      Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture) http:\\www.frankkerrigan.com

      C 2 Replies Last reply
      0
      • F Frank Kerrigan

        You could try and just use text straight from Oracle and use it as string. If you are using a strong typeing thi might not be possible.

        Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture) http:\\www.frankkerrigan.com

        C Offline
        C Offline
        crzyank
        wrote on last edited by
        #3

        That should work. I'll try that. Thanks! crzYank

        1 Reply Last reply
        0
        • F Frank Kerrigan

          You could try and just use text straight from Oracle and use it as string. If you are using a strong typeing thi might not be possible.

          Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture) http:\\www.frankkerrigan.com

          C Offline
          C Offline
          crzyank
          wrote on last edited by
          #4

          and it worked........... crzYank

          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