Hi Costin,
Looks like everything seems to be good based on string variable
Just try out like this As srilatha suggested
As per your string variable to get space between date and time value, Just try out this as shown below
formatDateTime($object/Date1,'yyyy-MM-dd') +’ ‘+ formatDateTime($object/Date1,'HH:mm:ss')
Hi,
Try with concatenating the two format dates functions,instead of using in a single function :
formatDateTime($object/Date1,'yyyy-MM-dd') + formatDateTime($object/Date1,'HH:mm:ss')
Hi,
Thank you for your prompt response.
Unfortunately, I got the same error:
Caused by: com.mendix.modules.microflowengine.MicroflowException: Failed to evaluate expression, error occurred on line 1, character 1
formatDateTimeUTC($DS_GetAnalysis_by_URL_Table/ANALYSIS_RUNTIME,'yyyy-MM-dd')+' '+formatDateTimeUTC($DS_GetAnalysis_by_URL_Table/ANALYSIS_RUNTIME,'HH:mm:ss')
^
at SmartStreams.Get_DataAnalysis_Detail_BKUP (CreateOrChangeVariable : 'Create String variable')
Advanced stacktrace:
at com.mendix.languages.mxexpressions.MxExpression.evaluate(MxExpression.scala:26)
Caused by: com.mendix.languages.expressions.ExpressionException: com.mendix.systemwideinterfaces.MendixRuntimeException: Unsupported number of parameters: 2
at com.mendix.languages.expressions.Expr.evaluate(Expr.java:22)
When I removed the pattern:
formatDateTimeUTC($DS_GetAnalysis_by_URL_Table/ANALYSIS_RUNTIME)
I got the error:
Caused by: com.mendix.modules.microflowengine.MicroflowException: Failed to evaluate expression, error occurred on line 1, character 1
formatDateTimeUTC($DS_GetAnalysis_by_URL_Table/ANALYSIS_RUNTIME)
^
at SmartStreams.Get_DataAnalysis_Detail_BKUP (CreateOrChangeVariable : 'Create String variable')
Advanced stacktrace:
at com.mendix.languages.mxexpressions.MxExpression.evaluate(MxExpression.scala:26)
Caused by: com.mendix.languages.expressions.ExpressionException: com.mendix.systemwideinterfaces.MendixRuntimeException: Unsupported number of parameters: 1
In fact the function works fine, the message is unnecessary. Why I didn’t get an error messge when I used the system variable [%CurrentDateTime%] ?
Are you sure the Datetime_* string variables contain the same format data?
Sometimes the debugger shows data differently: a string like “/Date(1574899200000)/” is shown in the debugger as datetime.
Hi,
It could be that the value being returned is empty, that’s why it might throw this error. Worked for me.
Cheers!