+ Reply to Thread
Results 1 to 12 of 12

DAY-Function fails

  1. #1
    Registered User
    Join Date
    01-01-2011
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    5

    DAY-Function fails

    Excel canīt count anymore:

    C5 is given a date (german:18.4.2011, englisch:2011-04-18)

    A2 is set to: =TAG(C5) (englisch: DAY(C5))

    Result in A2: 19

    No joke! See att. Any ideas?

    P.S.: Excel 2004 for Mac (11.5.6). At an other worksheet result is correct.
    Attached Images Attached Images
    Last edited by johntrav2004; 01-01-2011 at 07:42 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: Whats the hell is that?

    Please, rename your title according to the rules:

    1. Use concise, accurate thread titles. Your post title should describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change the title of the thread, click EDIT on the original post, then click the Go Advanced button, then change the title. If two or more hours have passed, the EDIT button will not appear, and you need to ask a moderator to change the title.
    Never use Merged Cells in Excel

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: DAY-Function fails

    So you got correct result in other sheets in same workbook?

    What happen when you change date in the cell? Do you have correct result?

  4. #4
    Registered User
    Join Date
    01-01-2011
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: DAY-Function fails

    Yes, in other sheets result is correct.

    When i change C5, A2 is day+1 still.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: DAY-Function fails

    If you review the Options which Date System are you using ?
    Presumably given Mac you're using 1904 Date System ?

    I can't replicate your issue on PC (ie both date systems would return 18), however, I don't have a Mac.
    The difference between the 1900 & 1904 Date system is 4 years and 1 day.

    If you format C5 as General what is the Serial Number ?

  6. #6
    Registered User
    Join Date
    01-01-2011
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: DAY-Function fails

    OK - that was the hint. I changed options > 1900-System (Windows-System) and now day-function responses as it should.

    However, it seems as if a new worksheet is marked with 1904-System by default. Although I have worked with Excel quite often, I was never forced to check the options, even within simular tasks. Note, that creating a new table WITHIN the same excel-file and filling in the same formula as described gives correct results without changing the options.

    I think, nobody knows why, doesnīt matter as far as changing the options results in correct responses within every table at the same worksheet.

    Thanks for the hint.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: DAY-Function fails

    Quote Originally Posted by johntrav2004 View Post
    Note, that creating a new table WITHIN the same excel-file and filling in the same formula as described gives correct results without changing the options.
    Yes, this was the point I was alluding to regards not being able to replicate your issue.

    The key to remember is the difference between the 2 systems equates to 4 years and 1 day - eg:

    0 on 1900 system is 0-Jan-1900 (default for PC)
    0 on 1904 system is 1-Jan-1904 (default for Mac)

    It follows that if you copy Date values (serials) across files using different date systems the value of the Date Serials will alter, eg:

    2 files
    Book1: 1900 system
    Book2: 1904 system
    [Book1]Sheet1!A1 = 18-Jun-2004 (Serial No. 38156)
    If we copy the above to Book2 the date in Book2 will "transform" to: 19-Jun-2008 (Serial No. 38156)
    What I could not replicate was how your date value in Book2 was showing as 18th of Month and DAY was returning 19 - this may be a Mac specific characteristic.

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: DAY-Function fails

    hmm... could it be alse due to leap year?

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719

    Re: DAY-Function fails

    Is that definitely a date in C5? It would be interesting to see what you get if you format C5 to general (as DonkeyOte says)

    I note that you also have Montag In C2 - that's correct for 18th April 2011 - do you have a formula in that cell? Can you post the actual workbook rather than a screenshot?
    Audere est facere

  10. #10
    Registered User
    Join Date
    01-01-2011
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: DAY-Function fails

    Quote Originally Posted by daddylonglegs View Post
    Is that definitely a date in C5? It would be interesting to see what you get if you format C5 to general (as DonkeyOte says)

    I note that you also have Montag In C2 - that's correct for 18th April 2011 - do you have a formula in that cell? Can you post the actual workbook rather than a screenshot?
    Yes, C5 ist a date, formatting C5 to general format didīt work. "Montag" in C2 is a manually filled in string, no formula.

  11. #11
    Registered User
    Join Date
    01-01-2011
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: DAY-Function fails

    Quote Originally Posted by zbor View Post
    hmm... could it be alse due to leap year?
    No, definitly not. I have used such self-made calendars for years. This strange behavior was effected by the pre-set date-format 1904.

  12. #12
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719

    Re: DAY-Function fails

    Quote Originally Posted by johntrav2004 View Post
    Yes, C5 ist a date, formatting C5 to general format didīt work.
    If C5 is a date then when you format to general you should get a "date serial number", e.g. assuming you have 1904 date system you'd see 39189 for 18th April 2011. If you change the format to general and you still see the same value, i.e. 18.4.2011 then C5 isn't a true date, it's text.

    DAY function should still cope with a text formatted date but that might have something to do with the error......

    If you go back to the original setup (with original data in C5 and 1904 date system) then what do you get with these formulas?

    =YEAR(C5)

    =YEAR(C5+0)
    Last edited by daddylonglegs; 01-03-2011 at 07:27 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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