=YEAR(3/7/2007) in EXCEL, get the answer as 1900. Why?
The other responders are correct in omitting the dbl-neg sign (--)....It's
not necessary because the YEAR function forces the conversion from text to
date.
***********
Regards,
Ron
XL2002, WinXP
"Ron Coderre" wrote:
Excel is actually performing the division indicated by 3/7/2007 to return
the numeric value of: 0.000213538330130258
which, as a date/time value is roughly 18 seconds into 01-JAN-1900
To indicate to Excel that you want the value converted to a date, use this
technique:
=YEAR(--"3/7/2007")
Excel will correctly interpret that you want to convert the text "3/7/2007"
into the date represented.
Does that help?
***********
Regards,
Ron
XL2002, WinXP
"LadyCat" wrote:
I am expecting the answer as 2007 from the function of =YEAR(3/7/2007)
|