Hello. I am using LibreOffice version 7.5 on a Windows 10 desktop.
.
I have a Calc spreadsheet that contains the following two columns:
- Date field (ie., 1992-05-18) - column F
- Year field (ie., 1992) - formatted with user-defined YYYY that contains a function =TEXT(F1,“yyyy”) to extract the year from the Date field.
.
This function works fine IF the Date field contains a complete date. But unfortunately, there are some instances wherein I do not know the month or day, so I use an “x” character to represent the unknown.
For example: 1992-05-xx or 1992-xx-xx.
.
Is there any way to extract only the year (first 4 digits) if I have to use “xx” in the Date field?
.
In addition, in some cases I do not even know the year, so I will type “1990s” in the Date field. In those cases, I need the extracted text in the Year field to be “1990s”.
.
Any suggestions will be much appreciated!