[Solved] Libre Calc Date Conversion

Discuss the spreadsheet application
Post Reply
NotLeftBehind
Posts: 67
Joined: Mon Sep 23, 2013 3:57 am
Location: NC, USA, Earth, Sector 001

[Solved] Libre Calc Date Conversion

Post by NotLeftBehind »

I have a spreadsheet with a lot of file names like:
Annual gathering [1999].mov
Annual gathering charity [1999].bmp
Christian charity BBQ (2019).mp4

Different file formats. Different enclosures for dates.

Is there a formula/method I can use to take the date out of column A and copy it in column B, opposed to me just typing them in cell by cell?

Thank you.
Last edited by NotLeftBehind on Thu Dec 22, 2022 5:33 pm, edited 1 time in total.
LibreOffice 7.4.4.2 (x64) on Windows 11 Pro
User avatar
karolus
Volunteer
Posts: 1252
Joined: Sat Jul 02, 2011 9:47 am

Re: Libre Calc Date Converstion

Post by karolus »

Hallo
There ar no valid Dates, only year-numbers.

Code: Select all

=MID(A1;SEARCH("(19|20)[0-9]{2}";A1);4)
you need probably →→Tools→→Options→OO-calc→calculate→[x]enable regular Expressions in Formulas
Libreoffice 25.2… on Debian 13 (trixie) (on RaspberryPI5)
Libreoffice 25.8… flatpak on Debian 13 (trixie) (on RaspberryPI5)
NotLeftBehind
Posts: 67
Joined: Mon Sep 23, 2013 3:57 am
Location: NC, USA, Earth, Sector 001

Re: Libre Calc Date Converstion

Post by NotLeftBehind »

Yes, just years in this case. That is what I meant by dates.

That formula worked! Thank you so much.
LibreOffice 7.4.4.2 (x64) on Windows 11 Pro
Post Reply