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


At 15:27 19/12/2014 +0000, Cony Honly Donly wrote:
When I enter 2015.01.01, it is recognized not as a date. How do I make it one step only?

Aha! This is a different question: you need Calc to recognise your entered text as a date, to convert the text string to the internal number representing that date (that's probably 42005 in your example case), and to set the cell's format to a date format if you have not already done this.

There are two solutions to this:

o As has already been suggested, if this format is not accepted by default in your locale, you may be able to add it at Tools | Options... | Language Settings | Languages | Language of | Date acceptance patterns.

o Failing this, you could easily set up a formula. Enter your desired text into, say, column A. In B1, say, enter something like
=DATE(LEFT(A1;4);MID(A1;6;2);RIGHT(A1;2))
and fill this down the column. If you want to be able to read column B, you will need to format it with your desired format. But you may be happy reading column A instead. Any formulae for calculations depending on your input would depend on column B, so would work as soon as you had entered your text into A. So this technique passes your "one step" test.

o You might find that =DATEVALUE(A1) works as well, but I imagine that this will work only with date formats that follow one of the acceptance patterns anyway.

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.