I have the following rows in column A. They are dates, but sometimes years or nothing. Also there could be till dates etc.
1999
5-1700/5-1960
4-1700/4-1960
1983-7-23
2019-07-10
1982-5-19
1982-5-19
1982-5-21
1982-5-18
1983-7-19/1983-7-22
I would like to split them in from_date from_year from_month from_day till_date till_year till_month till_day.
I tried the following in the from_year column:
=IF(REGEX(A2,"^(\d{4})$","$1"),REGEX(A2,"^(\d{4})$","$1"))
But it does give me #VALUE! for columns that do not match but it does give me the whole years also in the correct places
How should I do this?
if I use =REGEX(A2,"^(\d{4})$","$1") I get returned all values! (That should be plain wrong as I put beginning and end in the regex)
Perhaps I should first split the from and till dates first and then to the regex?
I have the feeling regex isn’t working properly in Libreoffice calc version: 6.2.8.2 (I am used to vim)
Any help would be appreciated!
Thanks
Bastiaan
EDIT 2019-XII-13: changed the example text as preformatted text and adjusted the dates day month order