Hi,
I am trying to build a generated column which extracts lastSessionStart
(a timestamp formatted in ISO format) from JSON column sessionAnalytics
.
I have tried the following without success : STR_TO_DATE(JSON_UNQUOTE(JSON_EXTRACT(sessionAnalytics, "$.lastSessionStart")), '%Y-%m-%dT%T.000Z')
The error message I get when creating the generated column is :
Incorrect datetime value: '2022-12-16T17:46:58.948Z' for function str_to_date
Could you point me in the right direction as to the correct syntax ? Thanks !
Side question : is it possible to create this value in a view, so as not to overload the table itself ?