+ Reply to Thread
Results 1 to 4 of 4

date extraction problem

  1. #1
    Registered User
    Join Date
    01-10-2012
    Location
    sydney
    MS-Off Ver
    Excel 2010
    Posts
    9

    date extraction problem

    Hi all

    I have a financial derivative thats named - X 1012 the number refers to its date of expiry, I want to extract the exact date of expiry. 10 refers to the 10th month (October), 2 is the year 2012, the 1 in the middle (and this is my problem) refers to the first week of the 10 month of 2012. the exact expiry is always on the wednesday of that week.

    Extracting the month and year is easy, my problem is finding exact date from the wednesday of the week number.

    Any help is appreciated

    Thank you

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: date extraction problem

    Possibly something along the lines of ... with x 1012 in A1, try

    =DATE(CONCATENATE(201,MID(A1,6,1)),1,(WEEKNUM(DATE(CONCATENATE(201,MID(A1,6,1)),MID(A1,3,2),1))+MID(A1,5,1))*7+4)

  3. #3
    Registered User
    Join Date
    01-10-2012
    Location
    sydney
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: date extraction problem

    Hey dangelor

    Thanx for the reply. nice idea! the date I received is the 10/17/2012 which is 2 weeks off, looking to get 10/3/2012...I didnt have time to figure out why the calculation at the end didnt work out, ill check it out later.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: date extraction problem

    Did you solve this zack65?

    I'm not sure how you are defining weeks, if half the week is in October and half in September then is that week 1 of October or the last week of September?Assuming that week 1 Wednesday is always the first Wednesday of the month, week 2 Wednesday is second Wednesday of the month etc. then try this formula

    =DATE(RIGHT(A1)+110,MID(A1,3,2),MID(A1,5,1)*7+1)-WEEKDAY(DATE(RIGHT(A1)+110,MID(A1,3,2),4))
    Audere est facere

+ 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