Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2006
    Posts
    157

    Unanswered: Different format of dates

    should I maintain dates in Julian date mode (yyyyddd format), where yyyy is the year and ddd is the day of the year (1-365 or 366 in leap years). Some systems people prefer the standard mm/dd/yyyy format. What is the advantage n disadvantage of using Julian date

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Quote Originally Posted by mustish1 View Post
    should I maintain dates in Julian date mode (yyyyddd format), where yyyy is the year and ddd is the day of the year (1-365 or 366 in leap years). Some systems people prefer the standard mm/dd/yyyy format. What is the advantage n disadvantage of using Julian date
    Why in the world would you want to?

    I'm going to guess that the statement "Some systems people prefer the standard mm/dd/yyyy format" should read "All systems people prefer the standard mm/dd/yyyy format!"

    Using mm/dd/yyyy is, in my opinion, best practice for the simple reason that this is how the Access Gnomes expect dates to be entered. Using any other format generally requires a lot of song and dance to make even simple things involving dates happen correctly. Simply using the British format of dd/mm/yyyy necessitates special handling!

    BTW, the format yyyyddd would not render year and day of the year. The ddd returns the first three characters of the name of the day of the week!

    The character to return the numerical day of the year is a simple 'y,' so for your purpose you would need 'yyyyy.' But once again, I ask, why would you want to do this?

    Linq ;0)>
    Last edited by Missinglinq; 09-10-12 at 01:12.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by Missinglinq View Post
    I'm going to guess that the statement "Some systems people prefer the standard mm/dd/yyyy format" should read "All systems people prefer the standard mm/dd/yyyy format!"
    nonsense and poppycock

    mm/dd/yyyy is ~not~ a standard

    the standard is yyyy-mm-dd

    but thanks for playing, make sure you pick up your consolation prize on the way out

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    In answer to the OP, I would not maintain a table in Julian data format, unless it were for a specific purpose (for example, the factory sites of my employer use Julian dates to compose lot numbers). Even then, I would prefer to create a view over a date table that generated the Julian version of each date.

    And I side with r937 on the standard date format! :P
    10% of magic is knowing something that no-one else does. The rest is misdirection.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    he Access / JET standard for dates is expressed as a real number
    the integr portion is the nuber fo days since an arbitary point in time (IIRC 31/12/1899), the decimal part is the time expressed as a proportion of the day, eg .5 = 12:00, .75 = 18:00 and so on

    when it comes to displaying the the date to humans you can use what ever format you like. and yes the only true (IE global) Standard is the ISO date format YYYY/MM/DD
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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