I want to get the hour and minute from Sprint Start Date (from 2020-04-07 09:06:54 get 09:06). Tried to create the calculated member:
[Sprint].CurrentMember.Get(‘Start date’) MATCHES “((?:[0-1][0-9]|2[0-3]):[0-5][0-9])”, but receive the error in the fields: #ERR: mondrian.olap.fun.MondrianEvaluationException: Exception while executing function MATCHES: java.lang.ClassCastException
The MATCHES function throws an error when it tries to compare the regex to an empty value (NULL). Or it might be that you are trying to regex a date format value with .Get()
CASE
WHEN
NOT IsEmpty([Sprint].CurrentMember.GetString("Start date"))
THEN
[Sprint].CurrentMember.GetString("Start date") MATCHES "((?:[0-1][0-9]|2[0-3]):[0-5][0-9])"
END
Please note that MATCHES function would just return true/false anyway.
There might be better ways to get the hour and minute, like adding a separate field in JIRA, that is then imported into eazyBI as a new property. But if you want to go the string extraction way then you can use Left() and Right() functions.