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. Database & SysAdmin
  3. Database
  4. SQL Nominal Date Conversion [modified]

SQL Nominal Date Conversion [modified]

Scheduled Pinned Locked Moved Database
databasequestion
4 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.
  • M Offline
    M Offline
    Member 4087890
    wrote on last edited by
    #1

    I currently have a table in SQL 2005 with two columns, one for Date, and one for Datetime. These are stored as nominal values, and is defined as the number of days since 12/30/1899, i.e. NOM_DATE 0 = 12/30/1899. Moment is defined as the number of minutes since 12/30/1899 12:00am (GMT), i.e. MOMENT 0 = 12/30/1899 12:00am. My question is how would I go ahead and convert these into actual dates like dd/mm/yy,using a stored procedure? Answer Found - Using DATEADD(days, Date, '18991230') worked.

    modified on Thursday, August 25, 2011 10:24 AM

    L 1 Reply Last reply
    0
    • M Member 4087890

      I currently have a table in SQL 2005 with two columns, one for Date, and one for Datetime. These are stored as nominal values, and is defined as the number of days since 12/30/1899, i.e. NOM_DATE 0 = 12/30/1899. Moment is defined as the number of minutes since 12/30/1899 12:00am (GMT), i.e. MOMENT 0 = 12/30/1899 12:00am. My question is how would I go ahead and convert these into actual dates like dd/mm/yy,using a stored procedure? Answer Found - Using DATEADD(days, Date, '18991230') worked.

      modified on Thursday, August 25, 2011 10:24 AM

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Since you have already found the solution, why not post it as an answer and mark it as answered?

      S 1 Reply Last reply
      0
      • L Lost User

        Since you have already found the solution, why not post it as an answer and mark it as answered?

        S Offline
        S Offline
        Simon_Whale
        wrote on last edited by
        #3

        You can only do that on the QA forums and not the general programming forums

        Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch

        L 1 Reply Last reply
        0
        • S Simon_Whale

          You can only do that on the QA forums and not the general programming forums

          Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          But when I click 'Good Answer' on a forum reply, I get a message saying 'Marked as answer'.

          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