+ Reply to Thread
Results 1 to 9 of 9

4 digit julian date

  1. #1
    Registered User
    Join Date
    04-19-2021
    Location
    Nashville, TN
    MS-Off Ver
    2015
    Posts
    3

    4 digit julian date

    Does anyone know the formula to convert a calendar date "=now()" to a 4 digit julian date JJJY?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: 4 digit julian date

    You will have to give more definition about what you mean by Julian date. The Julian date is the number of days since January 1, 4713 B.C. For example, today's Julian date is 21108. A Julian date is not a four-digit number.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: 4 digit julian date

    I have seen references to Julian dates with a 2 digit year component, and with a 4 digit year component... but never to one with a single digit year...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: 4 digit julian date

    There are a lot of different definitions to Julian Date (i.e. # of days passed since January 1, 4713 BC). One such nomenclature is yyddd where yy is last 2 digits of year followed by day number of that year (i.e. April 19, 2021 = 21109 as 4/19 is the 109th day of 2021). What do the 4 digits in your Julian Date refer to?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: 4 digit julian date

    In other contexts (older programming languages/contexts), I have heard of "Julian Date" referring to "day of the year" or what Wikipedia calls "ordinal date" (wikipedia's page also has some ideas for calculating ordinal date: https://en.wikipedia.org/wiki/Ordinal_date ). I think this use of "julian day" persists in spite of the confusion created between this understanding and the actual Julian calendar that the others are talking about.

    Assuming some of the technical aspects mentioned in the Wikipedia article don't apply, one could conceivably calculate ordinal date in Excel by subtracting 31 Dec previous year from the date of interest. =NOW()-DATE(2020,12,31) to get the number of days since the end of the previous year, though I would probably use TODAY() rather than NOW() because NOW() includes time information (today at current time of day). It looks like you then want to concatenate the last digit of the current year to result =CONCATENATE(TODAY()-DATE(2020,12,31),1).

    Depending on what exactly you are doing, YEARFRAC() might also be a useful function: https://support.microsoft.com/en-us/...rs=en-us&ad=us

    As the others have said, help us understand exactly what you mean by "julian date" and we should be able to help you.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    04-19-2021
    Location
    Nashville, TN
    MS-Off Ver
    2015
    Posts
    3

    Re: 4 digit julian date

    Thank you all, I have it.

    =TEXT((TODAY() -DATEVALUE("1/1/"&TEXT(TODAY(),"yy"))+1),"000")&TEXT(TODAY(),"yy")-20

    Displays 1091 4-digit Julian Date


    =TEXT(TODAY(),"yy")&TEXT((TODAY() -DATEVALUE("1/1/"&TEXT(TODAY(),"yy"))+1),"000")

    Displays 21109 5-digit Julian date.

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: 4 digit julian date

    So what you want is

    DDDY

    where DDD is the day of year, and Y is the last digit of the year.

    I guess that gets you there, but it will break for any year earlier than 2020 or later than 2029.

    This takes a slightly different approach and will be good forever.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-19-2021
    Location
    Nashville, TN
    MS-Off Ver
    2015
    Posts
    3

    Re: 4 digit julian date

    I see, that's good to know. Thanks!!

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: 4 digit julian date

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking on the star icon addreputationiconsmall.jpg below their name.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Extract and convert value (Julian date to Calendar date)
    By Bliznaca in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-16-2020, 09:41 AM
  2. [SOLVED] Convert 4-digit Julian Date (DDDY) to Calendar Date
    By jbbeard in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-01-2018, 04:52 PM
  3. Converting a julian date and time to standard date in excel 2010
    By Munkle555 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-22-2015, 10:49 AM
  4. convert calendar date ddmmyy to julian date yyyydd
    By imichalopo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-13-2015, 01:47 AM
  5. [SOLVED] How to convert Julian Date to regular excel date
    By Drehb4life in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-19-2013, 10:25 AM
  6. Convert a julian gregorian date code into a regular date
    By Robert in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-13-2006, 02:10 PM
  7. how to convert julian date to regular calendar date
    By Ron in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-05-2005, 07:06 PM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1