+ Reply to Thread
Results 1 to 4 of 4

Converting YYYYWWD to YYYYMMDD

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    329

    Converting YYYYWWD to YYYYMMDD

    Hello.
    I have a field with the date format : YYYYWWD, Or 2005101 (Week 10 day 1 in 2005)

    I want to convert this to a date formatet like: YYYYMMDD or 2005-03-07

    Anyone here who knows how to to this?

  2. #2
    Registered User
    Join Date
    03-14-2005
    Posts
    5
    select the cell or range of cells with the incorrect date format, right click your mouse,select "format cells",select number tab,select custom in the catagory window then type YYYY-MM-DD in the "type window" then press OK. date format should now be as requested

  3. #3
    Forum Contributor
    Join Date
    03-14-2005
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    329
    This does not help cause I don't have month in the original format. Only Week.
    The result for 2005101 is 7389-10-10. Not 2005-03-07 as I want it to be.
    Last edited by a94andwi; 03-14-2005 at 09:54 AM.

  4. #4
    Registered User
    Join Date
    03-14-2005
    Posts
    5
    sorry didnt see th WW bit
    paste the following equation into an adjacent cell:
    =DATE(LEFT(XX,4),1,-5)+(MID(XX,5,2)*7)+RIGHT(XX,1)
    where "XX" is the reference to the actual cell with the incorrect date format it
    this should give you a correct date
    this should work for all dates in 2005, for other years you may need to adjust the "-5" number up or down to get the correct date ( this number will always be between 0 and -6, as it controls how many days were in the first week of that year)

+ 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