+ Reply to Thread
Results 1 to 18 of 18

DAY() function is not working for custom date format

  1. #1
    Registered User
    Join Date
    04-16-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    10

    Exclamation DAY() function is not working for custom date format

    Hi,

    I have created the custom Date format as "dd/mm/yyyy" e.g. 24/04/2014. But when I am trying to get the DAY of the entered date using function DAY() it is giving error. not showing any result.
    I want the date format as I said and DAY() function should be work for the entered dates.
    Anyone please help me out of this...
    Last edited by milindbharambe; 04-24-2014 at 02:58 AM. Reason: sorry for the typo....it actually dd/mm/yyyy

  2. #2
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: DAY() function is not working for custom date format

    Hmm.

    It should automatically recognise it as a date. Are you entering it as such on the worksheet:

    A1 = "24/04/2014"
    B1 = "=DAY(A1)"

  3. #3
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: DAY() function is not working for custom date format

    I've just seen the problem. You've created a custom date format in the form "mm/dd/yyyy" and then entered your month as 24.

    It is seeing a British format date (i.e. dd/mm/yyyy) but being forced to recognise it as American (i.e. mm/dd/yyyy) and this is what is throwing it, I would guess.

  4. #4
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: DAY() function is not working for custom date format

    Hi,

    This is conflicting, "I have created the custom Date format as "mm/dd/yyyy" e.g. 24/04/2014", if your date format is mm/dd/yyyy, you need to enter 4/24/2014 (month,date, year)

    Regards,
    Chandra

    Please click on ‘ * Add Reputation’ button on the left side bottom of my post if I was helpful in resolving the issue.

  5. #5
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Pune
    MS-Off Ver
    Office 365 (Win 10)
    Posts
    489

    Re: DAY() function is not working for custom date format

    Hi,
    I think he meant dd/mm/yyyy only since the mentioned format is already there in the fomat list.

    Can you please upload the file Milind?

    If the above mentioned was your problem, please close the thread and make it as solved
    Please make the Post as solved, when you get your answer & Click * if you like my suggestion

  6. #6
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: DAY() function is not working for custom date format

    dd/mm/yyyy is also in the format list, certainly on my machine.

  7. #7
    Registered User
    Join Date
    04-16-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: DAY() function is not working for custom date format

    yes...sorry for the typo.

    its "dd/mm/yyyy"....I have updated the question.

  8. #8
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: DAY() function is not working for custom date format

    Ok, refer to my first answer, if the answer is 'yes', then let us know and we can have a look at the issue.

    Also, why the need for a custom format, surely dd/mm/yyyy is already built in as a possible format?

  9. #9
    Registered User
    Join Date
    04-16-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: DAY() function is not working for custom date format

    yes...I am doing the same.

    And yes..there is dd/mm/yyyy built-in there for different locations..but then also it is not working.
    I have attached the file please have a look.
    Attached Files Attached Files
    Last edited by milindbharambe; 04-24-2014 at 03:08 AM.

  10. #10
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: DAY() function is not working for custom date format

    When you enter the date please enter 04/24/2014 and see the result, it works. The cell will display the date in the desired format dd/mm/yyyy i.e, 24/04/2014, also the fucntion DAY(), returns the value.

  11. #11
    Registered User
    Join Date
    04-16-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: DAY() function is not working for custom date format

    yes...I tried the same and it is working fine. But the problem is I want to enter the date in the same format i.e. id "dd/mm/yyyy" and it should be displayed as it is. Because the user who are going to use sheet is not as much matured.

  12. #12
    Registered User
    Join Date
    10-08-2012
    Location
    hyderbad
    MS-Off Ver
    Excel 2007
    Posts
    13

    Smile Re: DAY() function is not working for custom date format

    Hi friend,

    you date is in text format..
    i did text to column & made custom format
    its working.

    Find the enclosed attachment


    Hope enjoy,

    MaSs
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    04-16-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    10

    Unhappy Re: DAY() function is not working for custom date format

    Are you sure? But when I tried to enter date like 25/04/2014 it fails to give day...

  14. #14
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: DAY() function is not working for custom date format

    You can always force the format of the cell(s) to a dd/mm/yyyy format? I'm not 100% sure I see the problem if you can enter the date in the format you want and the advice I gave above is working?

  15. #15
    Registered User
    Join Date
    04-16-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: DAY() function is not working for custom date format

    no its not working bro...I just want to enter the date in dd/mm/yyyy format which is available in other Locales but then the DAY function is not working for them.

  16. #16
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: DAY() function is not working for custom date format

    If you enter in any cell the text : "22/04/2004" then use =day(CELL) in another cell it will return '22' or (depending on your version of english) '04'.

    You need to expand on what you mean, you said above (post #11) that it is working fine, so I can't understand what the problem is! What do you mean by 'other locales'? Is this part of a larger spreadsheet?

    Give a list of all the data you are trying to use =day on and I will have a look.

  17. #17
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: DAY() function is not working for custom date format

    Hi TKCZBW,

    Though what you have mentioned in the above post is logically correct, the issue here is when we enter a date in dd/mm/yyyy format (e.g 24/04/2014) and apply DAY () formula on this cell, the result yeilds "#VALUE!". The issue which Milind has pointed out here is during a data entry excercise, when a user/s enter the date in dd/mm/yy format, the formula doesn't work here. It works only when you enter it as 4/24/2014.

  18. #18
    Registered User
    Join Date
    04-16-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: DAY() function is not working for custom date format

    I found one solution for this. I added "dd/mm/yyyy" as short format in systems date format available in Language and Regional settings and it worked.
    Thanks for you support guys..

+ 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. Custom Number Format not working as intented
    By Alex E. in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-10-2014, 05:07 AM
  2. [SOLVED] Custom format not working (for millions notation)
    By PinkGecko in forum Excel General
    Replies: 11
    Last Post: 09-13-2013, 08:22 AM
  3. Custom Format Not Working - Need Leading Zero
    By Karen615 in forum Excel General
    Replies: 1
    Last Post: 06-26-2013, 02:44 PM
  4. Custom Function not working...
    By h20worker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2011, 01:31 PM
  5. Custom Function not working
    By jhahes in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2006, 12:29 AM

Tags for this Thread

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