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 / C++ / MFC
  4. Automatic year in Date Problem :(

Automatic year in Date Problem :(

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++cssdatabasealgorithms
3 Posts 3 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.
  • A Offline
    A Offline
    Ammar
    wrote on last edited by
    #1

    I want to enter Month and Date only in date field. No year. But Access 2000 puts year in the field by itself. :( I read an article on MS site that this is a default functionality in Access2000. There should be an option to check this functionality off. I am using VC++. I get records from Access and put them in a grid. Since the Datagrid 6.0 control is bound to the db, it displays the year too. I am sorting data on date, so I cant change the field to "Text" type. I dont want the year to be there. How do I save month and date only in mdb file? HELLLLPPP!!! Ammar

    L A 2 Replies Last reply
    0
    • A Ammar

      I want to enter Month and Date only in date field. No year. But Access 2000 puts year in the field by itself. :( I read an article on MS site that this is a default functionality in Access2000. There should be an option to check this functionality off. I am using VC++. I get records from Access and put them in a grid. Since the Datagrid 6.0 control is bound to the db, it displays the year too. I am sorting data on date, so I cant change the field to "Text" type. I dont want the year to be there. How do I save month and date only in mdb file? HELLLLPPP!!! Ammar

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #2

      you must remember that access (and most db's i know of) store date / times in a kind of julian format (ie, the number of days since 1st jan 1900, for example, and the number of milliseconds since midnight) now saying "i dont want to store the year part of a date" is like saying you don't want to buy bananas with their skins on, ie, not in this world am not sure about data-bound grids (never use them cos you get all the hassles u are dealing with) but if you were to use unbound mode for the grid you could split the dates yourself and display only the day and month part of the date hmmm ... isnt there a PreDisplayData() type function you could trap into and do the same in bound mode? --- "every year we invent better idiot proof systems and every year they invent better idiots"

      1 Reply Last reply
      0
      • A Ammar

        I want to enter Month and Date only in date field. No year. But Access 2000 puts year in the field by itself. :( I read an article on MS site that this is a default functionality in Access2000. There should be an option to check this functionality off. I am using VC++. I get records from Access and put them in a grid. Since the Datagrid 6.0 control is bound to the db, it displays the year too. I am sorting data on date, so I cant change the field to "Text" type. I dont want the year to be there. How do I save month and date only in mdb file? HELLLLPPP!!! Ammar

        A Offline
        A Offline
        Anders Molin
        wrote on last edited by
        #3

        Make your own grid... Do not sound nice, but you can't get rid of the year in a date/time field in access... - Anders

        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