+ Reply to Thread
Results 1 to 31 of 31

Date Formula Question

  1. #1
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburg, Kansas
    MS-Off Ver
    2016
    Posts
    56

    Date Formula Question

    I have a column of dates like "9-Aug" which, in the cell, translates to "8/9/2018." However, the "9-Aug" should really mean "8/1/09." My question is how can I convert the column of numbers in the "9-Aug" format into a column that reads "8/1/09?" Any help would be most appreciated.

    Thank you.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Date Formula Question

    So the Aug should result in 8
    9 should result in the year of 09

    Where does the 1 come from?
    Will it always be

    "month/1/year" ?

    You're implying it is since the 1 is not input anywhere.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Date Formula Question

    There may be a simpler way

    =(TEXT(A1,"dd")&"/01/"&TEXT(A1,"mm"))+0

    This may not work as I'm using European date format.
    (You might have to swap "dd" "mm" around)

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Date Formula Question

    the answer to Special-K's question is important to know. That being said, you can always force it with this...
    =DATEVALUE(MONTH(A1)&"/1/0"&DAY(A1)) then format as date.
    BUT, the /0 part is also forcing it to be 2009 but if you go to 10 I don't think it will work.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  5. #5
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburg, Kansas
    MS-Off Ver
    2016
    Posts
    56

    Re: Date Formula Question

    The 1 is just the first day of the month and that will remain a constant for the dates in the final product. Does that help?

    Thank you!

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Date Formula Question

    well what I gave you returns 8/1/2009 or 8/1/09 if formatted that way. As I noted, I'm not sure what will happen if you go to 2010, I'd have to see an example to see how it might handle that.

  7. #7
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburg, Kansas
    MS-Off Ver
    2016
    Posts
    56

    Re: Date Formula Question

    Thanks Sambo kid! It works up to 2010. After 2010 I get an error message: #VALUE! Then when I view "Evaluate Formula" it shows DATEVALUE("1/1/010").

    Thoughts? Please and thank you.

  8. #8
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Date Formula Question

    show me what the date looks like for 2010 so I can see because it isn't readily intuitive to me.

  9. #9
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburg, Kansas
    MS-Off Ver
    2016
    Posts
    56

    Re: Date Formula Question

    Sure. It looks like 10-Jan and inside the cell it's 1/10/2018. Make sense?

  10. #10
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Date Formula Question

    well this change would work... =DATEVALUE(MONTH(A2)&"/1/"&DAY(A2))
    BUT, I'm struggling to visualize your data because if I saw a representative sample that shows what you have and what you expect it to be I (or someone else) might be able to write a formula that covers more scenarios.
    2nd BUT, this covers both scenarios =IFERROR(DATEVALUE(MONTH(A2)&"/1/0"&DAY(A2)),DATEVALUE(MONTH(A2)&"/1/"&DAY(A2))) but I'm not sure how it will work overall.

  11. #11
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburg, Kansas
    MS-Off Ver
    2016
    Posts
    56

    Re: Date Formula Question

    I'm happy to let you view the file but I cannot seem to attach in in this forum. I can e-mail it to you.

    Thank you.

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Date Formula Question

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  13. #13
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Date Formula Question

    is the second formula I created above in post #10 not working?
    you go to the "go advanced" button below the quick reply window, then mid way down you will see "manage attachments" and click on that. then browse to your sample file and upload it and click ok etc .

  14. #14
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburg, Kansas
    MS-Off Ver
    2016
    Posts
    56

    Re: Date Formula Question

    I believe your second formula is working, Sambo kid, thank you. For whatever reason I've tried two browsers and am still not able to go find the attachment I uploaded. But, I think your second formula is working. I'm trying it now with the remainder of my data set. Thank you.

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Date Formula Question

    Did you see post #12 on how to upload a file?

  16. #16
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburg, Kansas
    MS-Off Ver
    2016
    Posts
    56

    Re: Date Formula Question

    Yes I saw post #12 and followed the "recipe" but still can't get attachments to work. I'll keep trying. Thank you.

  17. #17
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Date Formula Question

    What happens when you go through those steps?

  18. #18
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburg, Kansas
    MS-Off Ver
    2016
    Posts
    56

    Re: Date Formula Question

    After I upload the attachment then go to "Go Advanced" to post when I pull-down the attachment icon there are no options from which to choose. Thank you.

  19. #19
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Date Formula Question

    Dont use the icon, (it sometimes doesnt work), scroll down a bit until you see the MANAGE ATTACHMENTS link

  20. #20
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburg, Kansas
    MS-Off Ver
    2016
    Posts
    56

    Re: Date Formula Question

    I did that and can see it under "Current Attachments" on the "Manage Attachments" page but how do I then upload that attachment into this post? Thank you.
    Attached Files Attached Files

  21. #21
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Date Formula Question

    Looks to me like you already did

  22. #22
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburg, Kansas
    MS-Off Ver
    2016
    Posts
    56

    Re: Date Formula Question

    Happy accident! It's column B that I'm working on. Thank you.

  23. #23
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Date Formula Question

    well good luck Ford, I can't open it, I get an invalid extension error.

  24. #24
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburg, Kansas
    MS-Off Ver
    2016
    Posts
    56

    Re: Date Formula Question

    Well, shoot! I think your formula is gonna work, though. Thanks, again.

  25. #25
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Date Formula Question

    Try this...
    =DATE(LEFT(TEXT(B2,"ddmm"),2),RIGHT(TEXT(B2,"ddmm"),2),1)

    (I opened it just fine, BTW)
    Attached Files Attached Files

  26. #26
    Registered User
    Join Date
    03-13-2018
    Location
    Pittsburg, Kansas
    MS-Off Ver
    2016
    Posts
    56

    Re: Date Formula Question

    Thank you.

  27. #27
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Date Formula Question

    Happy to help

  28. #28
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Date Formula Question

    Yeah, I'm not sure why Ford but when I see one loaded with a .xls extension instead of .xlsx I always get an error that says excel cannot open the file... .xlsx because the file format r file extension is not valid.
    if I try to save it and open it I still get the same message.
    it happens every time I try one with old file extensions.

  29. #29
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Date Formula Question

    Do you have both .xls and xlsx associated with excel in the file association options?

  30. #30
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Date Formula Question

    I can open my own with the .xls extension, just not if it is on this forum.
    I don't see it anywhere under file options.

  31. #31
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Date Formula Question

    I went into Windows Settings/Apps/Default Apps/Choose default apps by file type/scroll to almost the bottom and see if .xls is there and what it's associated with?

+ 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. Date Formula Question
    By stanz358 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-15-2015, 02:45 PM
  2. [SOLVED] Date formula question
    By Ian99099 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-20-2014, 03:17 AM
  3. Date Formula Question: date+1 year formatting
    By sheldons86 in forum Excel General
    Replies: 1
    Last Post: 07-30-2008, 04:41 PM
  4. Date formula question
    By Badger123 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-09-2007, 02:17 PM
  5. formula date question?
    By uptwospeed in forum Excel General
    Replies: 2
    Last Post: 06-06-2006, 05:55 PM
  6. RE: formula date question?
    By Allllen in forum Excel General
    Replies: 0
    Last Post: 06-06-2006, 05:55 PM
  7. [SOLVED] Formula date question
    By Dino in forum Excel General
    Replies: 5
    Last Post: 11-14-2005, 04:55 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