Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 138
Default convert date to yyyyddd format

Hi,

How can I format a date into the fomat yyyyddd where ddd is the day of the
calender year (i.e. out of 365 or 366 if a leap year. Assume my date is in
cell A2.

Bruce
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default convert date to yyyyddd format

=YEAR(A2)*1000+A2-DATE(YEAR(A2),1,0)
or
=YEAR(A2)&TEXT(A2-DATE(YEAR(A2),1,0),"000")
(if you want text)


Bruce wrote:

Hi,

How can I format a date into the fomat yyyyddd where ddd is the day of the
calender year (i.e. out of 365 or 366 if a leap year. Assume my date is in
cell A2.

Bruce


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default convert date to yyyyddd format

=YEAR(A2)&A2-DATE(YEAR(A2),1,)


"Bruce" wrote:

Hi,

How can I format a date into the fomat yyyyddd where ddd is the day of the
calender year (i.e. out of 365 or 366 if a leap year. Assume my date is in
cell A2.

Bruce

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
Convert European Date format to American Format Albert Excel Discussion (Misc queries) 3 August 21st 07 10:02 PM
Convert date from text format to date format Anita Excel Discussion (Misc queries) 3 June 4th 07 11:57 AM
Convert date + time text format to date format Paul Ho Excel Worksheet Functions 2 May 22nd 07 05:47 PM
Help: How do I convert a text date into a real date format japorms Excel Worksheet Functions 4 August 2nd 06 06:36 PM
How can I convert a date format to an ISO week format (in EXCEL)? ELI Excel Discussion (Misc queries) 2 July 6th 05 06:31 PM


All times are GMT +1. The time now is 02:30 PM.

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"