Property DataType conversion from String to DateTime in Report Definition Filter
In Report Definition filter, one property is string which contains datetime value in GMT format.
pxcreatedatetime >= temppage.startdate
In above condition, startdate is string which should be changed to DateTime to check filter condition in report definition.
One FunctionAlias is created to change the datetime format with below code but runtime exception is occurred.
I cannot change the startdate to datetime at property level because this is used at many places and impact will be high at application level.
In Report Definition filter, one property is string which contains datetime value in GMT format.
pxcreatedatetime >= temppage.startdate
In above condition, startdate is string which should be changed to DateTime to check filter condition in report definition.
One FunctionAlias is created to change the datetime format with below code but runtime exception is occurred.
I cannot change the startdate to datetime at property level because this is used at many places and impact will be high at application level.
<p:when test=".pyParameters(1).pyDBDataType == 'CLOB'">
CASE WHEN {1} IS NOT NULL
THEN
CAST ( CAST ({1} AS VARCHAR(4000)) AS DATETIME )
END
</p:when>
<p:otherwise>
CASE WHEN {1} IS NOT NULL
THEN
CAST ( {1} AS DATETIME )
END
</p:otherwise>
</p:choose>