Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


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+unsubscribe@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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.