+ Reply to Thread
Results 1 to 2 of 2

Convert date to workweek and year

Hybrid View

  1. #1
    Registered User
    Join Date
    09-05-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    2

    Unhappy Convert date to workweek and year

    I'm trying to trend data by workweek and year. I tried 2 different formulas {=(WEEKNUM(J2))&" - "&YEAR(J2) and =WEEKNUM(J2) & TEXT(J2, "-yy")}. They almost work but for single digit WWs I only get a single digit, eg 1-2013 instead of 01-2013. When I put this into a pivot table I get the following list below. I need to extend the trend by workweek over different years.

    How can I do this? Thanks for any help someone can provide.

    1 - 2013
    10 - 2013
    11 - 2013
    12 - 2013
    13 - 2013
    14 - 2013
    15 - 2013
    16 - 2013
    17 - 2013
    18 - 2013
    19 - 2013
    2 - 2013
    20 - 2013
    21 - 2013
    22 - 2013
    23 - 2013
    24 - 2013
    25 - 2013
    26 - 2013
    27 - 2013
    28 - 2013
    29 - 2013
    3 - 2013
    30 - 2013
    31 - 2013
    32 - 2013

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,421

    Re: Convert date to workweek and year

    You can get leading zeros for the week number using this:

    =TEXT(WEEKNUM(J2),"00")&" - "&YEAR(J2)

    Hope this helps.

    Pete

+ 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. how to convert date to fiscal year if fiscal year start at 16th or 17th of July
    By sushil shakya in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-28-2013, 03:32 AM
  2. [SOLVED] How to convert date into day of year.
    By naveen4pundir in forum Excel General
    Replies: 7
    Last Post: 03-28-2012, 06:14 AM
  3. Convert a day date to a year
    By Stu100 in forum Excel General
    Replies: 3
    Last Post: 03-09-2010, 09:10 AM
  4. date stamp with only workweek daya
    By adgjqetuo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2009, 12:55 PM
  5. Convert Date to year?
    By Newtoexcel1974 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-17-2007, 10:03 AM

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