#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Date function

I am using the NOW() function to insert the current date. This works fine,
except I am attempting to extract only the year (i.e. 2007) from this
function.

The problem is that Excel expresses the value of the date as a number (x
number of days from January 1, 1900). I can get the format to display the
date in an mm/dd/yyyy format, I just can not extract the year all alone. I
need to get the year by itself for another calculation.

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Date function

=YEAR(TODAY())

Format as date, not number.

Dave
--
Brevity is the soul of wit.


"JohnU" wrote:

I am using the NOW() function to insert the current date. This works fine,
except I am attempting to extract only the year (i.e. 2007) from this
function.

The problem is that Excel expresses the value of the date as a number (x
number of days from January 1, 1900). I can get the format to display the
date in an mm/dd/yyyy format, I just can not extract the year all alone. I
need to get the year by itself for another calculation.

Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default Date function

Hi John

=YEAR(NOW())
or with
=NOW() entered into a cell, FormatCellsNumberCustom yyyy

Remember NOW() is volatile and your value will alter next year.

If you want to enter the fixed Date into a cell use Control + semicolon
(CTRL+;)
Again format the cell to just show yyyy
--
Regards

Roger Govier


"JohnU" wrote in message
...
I am using the NOW() function to insert the current date. This works
fine,
except I am attempting to extract only the year (i.e. 2007) from this
function.

The problem is that Excel expresses the value of the date as a number
(x
number of days from January 1, 1900). I can get the format to display
the
date in an mm/dd/yyyy format, I just can not extract the year all
alone. I
need to get the year by itself for another calculation.

Any ideas?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Date function

John

In a helper cell enter =YEAR(cellref)


Gord Dibben MS Excel MVP

On Tue, 9 Jan 2007 08:22:00 -0800, JohnU
wrote:

I am using the NOW() function to insert the current date. This works fine,
except I am attempting to extract only the year (i.e. 2007) from this
function.

The problem is that Excel expresses the value of the date as a number (x
number of days from January 1, 1900). I can get the format to display the
date in an mm/dd/yyyy format, I just can not extract the year all alone. I
need to get the year by itself for another calculation.

Any ideas?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 620
Default Date function

Are you sure you want to format that as date, Dave?
=YEAR(TODAY()) formatted as date will give you 29th June 1905. I would
prefer to see it formatted as General or Number.
--
David Biddulph

"Dave F" wrote in message
...
=YEAR(TODAY())

Format as date, not number.

Dave


"JohnU" wrote:

I am using the NOW() function to insert the current date. This works
fine,
except I am attempting to extract only the year (i.e. 2007) from this
function.

The problem is that Excel expresses the value of the date as a number (x
number of days from January 1, 1900). I can get the format to display
the
date in an mm/dd/yyyy format, I just can not extract the year all alone.
I
need to get the year by itself for another calculation.

Any ideas?





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Date function

No, you're right. Should be formatted as general or number.
--
Brevity is the soul of wit.


"David Biddulph" wrote:

Are you sure you want to format that as date, Dave?
=YEAR(TODAY()) formatted as date will give you 29th June 1905. I would
prefer to see it formatted as General or Number.
--
David Biddulph

"Dave F" wrote in message
...
=YEAR(TODAY())

Format as date, not number.

Dave


"JohnU" wrote:

I am using the NOW() function to insert the current date. This works
fine,
except I am attempting to extract only the year (i.e. 2007) from this
function.

The problem is that Excel expresses the value of the date as a number (x
number of days from January 1, 1900). I can get the format to display
the
date in an mm/dd/yyyy format, I just can not extract the year all alone.
I
need to get the year by itself for another calculation.

Any ideas?




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 Stop =TODAY() date function changing byitself Kevin Excel Worksheet Functions 8 January 2nd 07 01:51 PM
Using TODAY function to return a date as text GH Excel Discussion (Misc queries) 1 December 19th 06 06:17 PM
MATCH FUNCTION AND SERIAL DATE CONFLICTS Jones the Scouse Excel Worksheet Functions 4 November 1st 06 01:46 PM
"year" date function scott Excel Discussion (Misc queries) 3 September 11th 06 01:54 PM
Date formulas DRondeau Excel Discussion (Misc queries) 7 September 6th 06 09:53 PM


All times are GMT +1. The time now is 08:05 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"