Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to Stop =TODAY() date function changing byitself | Excel Worksheet Functions | |||
Using TODAY function to return a date as text | Excel Discussion (Misc queries) | |||
MATCH FUNCTION AND SERIAL DATE CONFLICTS | Excel Worksheet Functions | |||
"year" date function | Excel Discussion (Misc queries) | |||
Date formulas | Excel Discussion (Misc queries) |