I interpreted what you wrote to mean that =datevalue(a1) would convert the contents of A1 into a date. It did not and produced err502. What am I missing?

Thank you for helping so quickly  :-)




Mark W. Howe
San Juan Capistrano, CA
949-496-3453 home/ office
949-525-3914 cell [not for messages]

"Phao Binh" http://swcenter.fortlewis.edu/finding_aids/inventory/2008008.pdf
-----Original Message----- From: Brian Barker
Sent: Thursday, February 19, 2015 7:05 AM
To: users@global.libreoffice.org
Cc: Mark Howe
Subject: Re: [libreoffice-users] Formatting a date

At 06:41 19/02/2015 -0800, Mark Howe wrote:
I have text: 19 February 2015. The format for the cell is date 2/19/2015, but it will not acknowledge that or sort correctly. As if it's formatted for date but not accepting that fact. What did I do wrong?

o If you format a cell as Date and then type a date, the value will
be edited from the text you type to an internal number - the number
of days (and potentially fractions of a day) since the date origin.
This will then be displayed as a date, in the format you chose.

o If you type the text "19 February 2015" into a cell you have not
previously assigned a type, Calc will.(subject to the diktats of your
locale) translate the date to the internal number and apply a default
date format to the cell.

o But if you first enter text - even if it looks like a date to you
and me - and then apply a date format, you are asking Calc to format
text as a date. But it cannot do that - at least, it cannot do so
without amending the actual contents of the cell, which would be undesirable.

If you want your existing values to be genuine dates - as you will
want to do if you need to include them in calculations or even just
sort them - you must first convert the text into the equivalent date.
Fortunately. the DATEVALUE() function is available to do this for
you. Just put =DATEVALUE(Xn) in another column and fill down. You can
copy the results back over your original data if you prefer, but you
will have to use Paste Special and ensure that Formulae is *not*
ticked in the Paste Special dialogue. Once you format the cell as
your preferred Date format, you will have what you need.

I trust this helps.

Brian Barker

--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
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

Reply via email to