Peter Chabot
Peter Chabot

Reputation: 139

How to extract only date from Google Sheets cell

I'm trying to extract only the date from this cell which says: Current day (1 Nov 2019) Using:

=regexextract(concatenate(FullReport!B5),".*Current day(.*)")

Can't seem to figure out how to remove the brackets ( ) which I believe is causing it to not register in google sheets as an actual date.

Upvotes: 1

Views: 3488

Answers (2)

Allewar
Allewar

Reputation: 1

I tested with this formula and it works fine:

=regexextract(concatenate(FullReport!B5),"\(([A-Za-z0-9\ ]+)\)")

Upvotes: 0

player0
player0

Reputation: 1

to extract:

=REGEXEXTRACT(A1, "\((.+)\)")

0

while true date would be:

=ARRAYFORMULA(JOIN("/", 
 IFERROR(REGEXEXTRACT(A1, "\((\d+) (.+) (\d+)")*1, 
   MONTH(REGEXEXTRACT(A1, "\((\d+) (.+) (\d+)")&1))))

0

or just:

=REGEXEXTRACT(A1, "\((.+)\)")*1

Upvotes: 1

Related Questions