Take out Date from texts

Example

The event memo is recorded in the Excel file book1.xlsx, and the original information is shown in the figure below:

undefined

Separate the dates and place them in the next column after separating them with semicolons, as shown below:

undefined

Write SPL script:


A

1

=clipboard().split@n(" ")

2

=A1.(~.(date(~,"dd.MM.yy")))

3

=A2.(~.select(ifdate(~)))

4

=clipboard(A3.concat@n(";"))

 

A1 Read the clipboard data, and then split it into lines with \n, and split the lines into text with spaces to form a sequence of sequences

 

A2 Convert the text in the sequence to the date type data according to the specified format

 

A3 Select date type data, separate date and other text

 

A4 Concatenate the members in each row of A3 with semicolons to form text, and then use \n to concatenate each row to form text, and put it into the clipboard

 

Open book1.xlsx, select the A1:A4 area, press Ctrl+C to copy, enter esProc to run the SPL script, return to Excel after running, select B1, and press Ctrl+V to paste the results in the clipboard.