+ Reply to Thread
Results 1 to 5 of 5

Help with converting a file name into a usable date

  1. #1
    Registered User
    Join Date
    09-03-2012
    Location
    Australia, Victoria
    MS-Off Ver
    Excel 2003
    Posts
    25

    Help with converting a file name into a usable date

    Hi All,

    I'm having trouble converting a file name into a date.

    in cell A1 which has formula =MID(CELL("filename"),FIND("[",CELL("filename"))+1,(FIND("]",CELL("filename"))-FIND("[",CELL("Filename"))-1))

    This populates the file name "WC20130715.xlsx"

    I would like to trim the file name to only be 20130715 (format is Year, Month, Day), then flip the date to be in the format of (Day, Month, Year) and make it a usable date so I can reference this cell to automatically populate dates for the rest of the week

    Thank you

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Help with converting a file name into a usable date

    double post
    Last edited by humdingaling; 07-11-2013 at 12:11 AM. Reason: double post
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Help with converting a file name into a usable date

    from the above it sounds like you already have the answer?
    from WC20130715.xlsx
    assume name is in a1

    =DATE((MID(a1,3,4)),(MID(a1,7,2)),(MID(a1,9,2))) ... gives 15-07-2013

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Help with converting a file name into a usable date

    hi arekkusu, another alternative:
    =TEXT(MID(A1,3,8),"00-00-00")+0

    format to date.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Registered User
    Join Date
    09-03-2012
    Location
    Australia, Victoria
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Help with converting a file name into a usable date

    Thank you humdingaling and benishiryo for your help and knowledge

+ 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