Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default convert day of year to numeric value format year+day in 4 digits

I want to convert the day of the year into the format of year then the 3
digit day value - so 9031 would be january 31 2009 - want to have Excel
automatically calculate based on current date.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default convert day of year to numeric value format year+day in 4 digits

=--(YEAR(A1)-2000&TEXT(DAY(A1),"000"))


"Kaaren" wrote:

I want to convert the day of the year into the format of year then the 3
digit day value - so 9031 would be january 31 2009 - want to have Excel
automatically calculate based on current date.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default convert day of year to numeric value format year+day in 4 digits

On Sat, 7 Feb 2009 09:18:01 -0800, Kaaren
wrote:

I want to convert the day of the year into the format of year then the 3
digit day value - so 9031 would be january 31 2009 - want to have Excel
automatically calculate based on current date.



With current date in A1:

=--(TEXT(A1,"yy") &TEXT(A1-DATE(YEAR(A1)-1,12,31),"000"))

Or you could substitute TODAY() for A1 to automatically update each day:

=--(TEXT(TODAY(),"yy") &TEXT(TODAY()-DATE(YEAR(TODAY())-1,12,31),"000"))

--ron
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default convert day of year to numeric value format year+day in 4 digits

Hi,

You can use

If you don't need the number for calculations or

=TEXT(NOW(),"yy")&0&DATEDIF(DATE(YEAR(NOW()),1,1)-1,NOW(),"d")

If you do need the number for calculations.

=--(TEXT(NOW(),"yy")&0&DATEDIF(DATE(YEAR(NOW()),1,1)-1,NOW(),"d"))


--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Kaaren" wrote:

I want to convert the day of the year into the format of year then the 3
digit day value - so 9031 would be january 31 2009 - want to have Excel
automatically calculate based on current date.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to sort XX/XX (the last 2 digits is the year in ascending orde Fred Excel Discussion (Misc queries) 1 October 18th 07 08:55 PM
How to convert date to financial year format 2006-07 Yog Raj Excel Worksheet Functions 4 May 19th 07 07:45 AM
How do I convert a month-date format to day number of the year? Larry Excel Worksheet Functions 2 January 11th 07 05:21 PM
how do I convert a dates in a year quarters in a year? Linndek Excel Discussion (Misc queries) 2 May 11th 06 03:33 PM
month & year format in two digits Morphyus C via OfficeKB.com Excel Discussion (Misc queries) 1 August 5th 05 06:22 PM


All times are GMT +1. The time now is 11:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"