On 07/19/14 22:44, James wrote:
> On 07/19/14 21:34, Brian Barker wrote:
>> At 20:27 19/07/2014 -0400, James Lockie wrote:
>>> I want the years since a date and today. I tried this function:
>>> =YEARS(7/16/2012,TODAY(),1)
>>> but it returns 1900.
>>
>> Your first argument is 7 divided by 16 divided by 2,012. This is
>> approximately 0.00022, representing - as a date and time - nineteen seconds
>> after midnight on the date origin. So I'd expect the result to be 115. But
>> in any case it won't have anything to do with a date in July 2012.
>>
>> The arguments of YEARS() need to be numeric dates, so I think you need
>> something like
>> =YEARS(DATE(2012,7,16),TODAY(),1)
>> or
>> =YEARS(DATEVALUE("7/16/2012"),TODAY(),1)
>>
>> I trust this helps.
>>
>> Brian Barker
>>
>>
> I tried:
> =YEARS(DATE(2012,7,16),TODAY(),1)
> I still get "1900".
> The cell format is YYYY.
>
I set the cell format to numeric and got what I want. :-)
--
To unsubscribe e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted