SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Format: CCYY-MM-DD

    This may vary from database to database, but what does the following format mean and yield...

    Code:
    CCYY-MM-DD

    Today is "2013-08-01", and we are in the "21st century", so my understanding is that the above Date Format would yield...

    Code:
    2113-08-01
    If that is the case, then this definitely is NOT what my client thinks it means!!

    Sincerely,


    Debbie

  2. #2
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,265
    Mentioned
    115 Post(s)
    Tagged
    1 Thread(s)
    It returns exactly what is says, centuryyear-month-day. For today, it would show 2013-08-01. We may be in the 21st century, but the numeric indicator is 20 (since the 1st century A.D. started with 0000)

    Edit:

    Though apparently Oracle may have decided to be stupid and have an issue with using that industry standard and will give you the wrong century, and you have to use YYYY instead.
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style
    Learn how to be ready for The Forums' Move to Discourse

  3. #3
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DaveMaxwell View Post
    It returns exactly what is says, centuryyear-month-day. For today, it would show 2013-08-01. We may be in the 21st century, but the numeric indicator is 20 (since the 1st century A.D. started with 0000)

    Edit:

    Though apparently Oracle may have decided to be stupid and have an issue with using that industry standard and will give you the wrong century, and you have to use YYYY instead.
    I think Oracle is spot on.

    Um, if you want to split hairs, the "Millenial Year" is "2", the "Century Year" is "0", the "Decade Year" is "1" and the "Year-Year" is "3" (i.e. 2+0+1+3)

    So if you - not personally - want to be DIFFICULT, then why not have a new format like this...
    Code:
    MCDY
    
    M = Millenial
    C = Century
    D = Decade
    Y = Year

    YYYY has worked for the last 50 years, so why do we need a CCYY all of a sudden?!


    Personally, I think the whole "CC" idea is a asinine!! How many ways do you need to communicate something that already exists (i.e. YYYY = 4-digit year)?!

    Sincerely,


    Debbie

  4. #4
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,265
    Mentioned
    115 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by DoubleDee View Post

    YYYY has worked for the last 50 years, so why do we need a CCYY all of a sudden?!
    Hmmmm....everything I've seen since the mid 90's has been CCYY - everything before that was YY (hence the chaos of the Y2K projects)

    Quote Originally Posted by DoubleDee View Post
    Personally, I think the whole "CC" idea is a asinine!! How many ways do you need to communicate something that already exists (i.e. YYYY = 4-digit year)?!
    So use YYYY if it makes you more comfortable - it seems to be supported from what I can see......
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style
    Learn how to be ready for The Forums' Move to Discourse

  5. #5
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DaveMaxwell View Post
    Hmmmm....everything I've seen since the mid 90's has been CCYY - everything before that was YY (hence the chaos of the Y2K projects)
    Not trying to sound argumentative, but if everyone uses a 4-digit year (e.g. YYYY), then there would never be any issues, and introducing CCYY provides absolutely no additional value, right? (In fact, it creates a lot of ambiguity as we are discussing here?!)


    So use YYYY if it makes you more comfortable - it seems to be supported from what I can see......
    I guess I have been away from databases for too long. Back when I was more into databases - including Oracle - in the early 2000's everything I ever saw was YYYY.

    At any rate, as far as my client is concerned, my suspicions seem to be right, and we need to change the requirements, because saying CCYY is not what people want since we use Oracle!!

    Sincerely,


    Debbie

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,815
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    I wonder who came up with YYYY. It was always CCYY in all the references I saw back in the 1970s and 80.

    CCYY is easier to distinguish from YY than YYYY is so back when two digit years were common there were good reasons for CCYY. Perhaps not so relevent now that all most all year fields use four digits (except for the Japanese ones that have a letter prefix on the year and so would presumably be ECCYY or EYYYY)
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •