+ Reply to Thread
Results 1 to 5 of 5

Ordinal Day to Date Conversion Irregularity

  1. #1
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Eagle River, Alaska
    MS-Off Ver
    Excel 2010
    Posts
    145

    Ordinal Day to Date Conversion Irregularity

    I have attached small file to illustrate what I have encountered. When using today as ordinal day (334) and formulas to convert to calendar format, I get 11/30/2014 (as it should be). However, when I use a custom format [dd] to only capture the numerical day, what is returned in cell [C3] is 29. That is one off. Does anyone know why this happens? Thanks!
    Attached Files Attached Files

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

    Re: Ordinal Day to Date Conversion Irregularity

    Because you've subtracted the year and 29 refers to the 334th day of 1900, which must have been 29th November... Reformat to short date and see...
    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

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Ordinal Day to Date Conversion Irregularity

    That's due to the fact that when you get the result of the formula

    =TODAY()-DATE(YEAR(TODAY()),1,0)

    it equals 334 or 29/11/1900 in date format.

    1900 is a leap year as per Excel. As such, when you calculate the day based on this result it will consider 29 days in Feb and will give you a day short of what your requirement is unless you use it in a leap year too. Your results prior to feb 29 will all be correct whereas all results post that will be off by a day.

    Hope this helps
    Last edited by Ace_XL; 11-30-2014 at 11:50 AM.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

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

    Re: Ordinal Day to Date Conversion Irregularity

    But only in the bizarre world of Bill Gates' imagination was 1900 a leap year

  5. #5
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Eagle River, Alaska
    MS-Off Ver
    Excel 2010
    Posts
    145

    Re: Ordinal Day to Date Conversion Irregularity

    It appears if I use Row 10 and replace the existing formula in [B2] with [B2] = [C10], then I get 30 as the answer in [B3]. Somehow in Row 10 that 1900 year hidden reference gets purged from the formula [B2]=TODAY()-DATE(YEAR(TODAY()),1,0). I don't think that's what you meant by the "reformat to short date", so I am not doing something right in a specific cell in Row 3.

+ 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. Ordinal days help
    By adown in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-20-2014, 04:14 AM
  2. ordinal numbers
    By dbuff in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-03-2014, 09:36 PM
  3. Long date/short date conversion and cycle time calculation
    By COGICPENNY in forum Excel General
    Replies: 1
    Last Post: 02-14-2014, 05:17 PM
  4. [SOLVED] Automatic graph creation - rows and columns irregularity
    By marky9074 in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 12-19-2012, 10:01 AM
  5. How can I enter an Ordinal numbered date
    By ukdodger in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-05-2012, 07:13 AM

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