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


2011/7/29 Koen van Steekelenburg <koenvansteekelenburg@gmail.com>:
Dear readers,

I have a document(csv converted to spreadsheet) with bankstatements. Those
statements have a date in the form of YYYYMMDD (no /'s or -'s). The problem
is that I can't make libreoffice recognise those numbers as dates. Can
somebody explain how I can make Libreoffice recognise the YYYYMMDD numbers
as dates.

Kind regards,
Koen

--
Unsubscribe instructions: E-mail to users+help@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



I would do a search and replace as follows:

Highlight the cell range with the numbers that you want to convert to dates.
Open the search and replace dialogue.

Make sure that ”Regular expressions” is checked (you need to press the
”More options” button first).

Search for:
^([:digit:]{4})([:digit:]{2})([:digit:]{2})$

Replace with:
$1-$2-$3
or
$1/$2/$3
or
$3/$2/$1
or whatever format you'd prefer.

Hit ”Replace all” or search and replace them one by one.

I just tested this on my system (language=Swedish, country=Sweden). I
entered 20110729 in one cell and then replaced
^([:digit:]{4})([:digit:]{2})([:digit:]{2})$ by $1-$2-$3.
The cell displayed 11-07-29 (since the default date format on my
system seems to be YY-MM-DD) and in the formula field I could read
2011-07-29, as expected.


Regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

-- 
Unsubscribe instructions: E-mail to users+help@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.