Day of week function in Camunda DMN

Hello,
I’ve added the following code to a Camunda DMN literal expression:
day of week(date0), where date0 has the Date Type.
Unfortunately, the UiPath Business Rule Parser fails parsing it:
“Exception while parsing the expression date of week(date0)”.
Any help would be much appreciated.
Many thanks.

@pr1

Please use
FormatDateTime(date0, “dddd”)

@pr1

Can you check date0 is in dateformat or not if not try to convert into date format then check it with same expression

Is FormatDateTime supported by the Camunda DMN Editor?
I believe it is a Microsoft function, not a FEEL function.
Furthermore, can date0 have the “dateTime” type of must it be of type string?

date0 has the “date” type in the Decision Table.
The literal expression called “extraireNomDuJour” (“extract day name”, in French) contains a variable called extraireNomDuJour of type “dateTime”.
I don’t think FormatDateTime, a Microsoft SQL function (cf. Fonction FormatDateTime - Support Microsoft), can be used in the Camunda Editor as it only supports the FEEL language (cf. What is FEEL? | Camunda 8 Docs)

@pr1

if it datetime format

try to use below format
date0.Dayofweek

dayOfWeek(date0)

date0 should be of type DateTime

FormatDateTime is a Microsoft function and is not supported directly in the Camunda DMN Editor as it uses FEEL (Friendly Enough Expression Language). Use FEEL functions like dayOfWeek

If you found helpful, feel free to tick as a solution.
Happy Automation

Hi,
I get the following error:

net.adamec.lib.common.dmn.engine.engine.execution.DmnExecutorException: Exception while parsing the expression dayOfWeek(date0) ---> DynamicExpresso.Exceptions.UnknownIdentifierException: Unknown identifier 'dayOfWeek' (at index 0).   at DynamicExpresso.Parsing.Parser.ParseIdentifier()
   at DynamicExpresso.Parsing.Parser.ParsePrimaryStart()
   at DynamicExpresso.Parsing.Parser.ParsePrimary()
   at DynamicExpresso.Parsing.Parser.ParseUnary()
   at DynamicExpresso.Parsing.Parser.ParseMultiplicative()
   at DynamicExpresso.Parsing.Parser.ParseAdditive()
   at DynamicExpresso.Parsing.Parser.ParseShift()
   at DynamicExpresso.Parsing.Parser.ParseTypeTesting()
   at DynamicExpresso.Parsing.Parser.ParseComparison()
   at DynamicExpresso.Parsing.Parser.ParseLogicalAnd()
   at DynamicExpresso.Parsing.Parser.ParseLogicalXor()
   at DynamicExpresso.Parsing.Parser.ParseLogicalOr()
   at DynamicExpresso.Parsing.Parser.ParseConditionalAnd()
   at DynamicExpresso.Parsing.Parser.ParseConditionalOr()
   at DynamicExpresso.Parsing.Parser.ParseConditional()
   at DynamicExpresso.Parsing.Parser.ParseAssignment()
   at DynamicExpresso.Parsing.Parser.ParseExpressionSegment()
   at DynamicExpresso.Parsing.Parser.ParseExpressionSegment(Type returnType)
   at DynamicExpresso.Parsing.Parser.Parse()
   at DynamicExpresso.Interpreter.ParseAsLambda(String expressionText, Type expressionType, Parameter[] parameters)
   at DynamicExpresso.Interpreter.Parse(String expressionText, Type expressionType, Parameter[] parameters)
   at net.adamec.lib.common.dmn.engine.engine.execution.context.DmnExecutionContext.EvalExpression(String expression, Type outputType, String executionId) in C:\Users\radek\Documents\Visual Studio 2017\Projects\Common.DMN.Engine\net.adamec.lib.common.dmn.engine\engine\execution\context\DmnExecutionContext.cs:line 251
...