How to combine TODATE and REGEXP_REPLACE in Looker?

25 Views Asked by At

I want to retrieve the front value of the 'rentang' column for my 'start date' column by creating a field in Looker.

The value of my rentang column is "Oct 23, 2023 - Oct 27, 2023" and I expect my 'start date' value to contain "Oct 23, 2023" to be able to retrieve the week value automatically when I add data. To convert the data from string to date I used the "TODATE" syntax but the result was zero.

enter image description here

Here is the syntax I used

TODATE(REGEXP_REPLACE(Rentang, '(.*):(.*)', '\\1'),'DD MM YYYY','%Y-%m-%d')

What's wrong with my syntax? Can anyone help me? I would really appreciate your help

0

There are 0 best solutions below