BusinessObjects Board

Error: Incorrect data type DMB003 - DeskI

Hi,

I have created a variable in WebI which I am comparing two dates (Start & End dates).

The below variable/syntex is working fine in WebI however if I use the same logic in DeskI it’s not working (Error: Incorrect data type DMB003)

WebI Syntex - It works perfectly
=If ( ([Start Date] <= [End Date] ) Or ([Start Date] >= [End Date] ) ) Then " " Else Max([Start Date])
Output
Start Date End Date
01/08/2017
01/12/2017
01/10/2017

In DeskI - Using BO3.2 version
=If ( ( <= ) Or ( >= ) ) Then " " Else Max()
I am getting Incorrect Data Type (DMB0003).

I am not sure where I am doing mistake.

Much appriciate your help to resolve this error.

Thanks


remahesh (BOB member since 2006-08-09)

The results of the “If” and the “Else” have to be of the same data type. In your case, the result of “If” is a string (""), and the result of “Else” is a Date. Try using FormatDate() to convert the date to a string.


joepeters :us: (BOB member since 2002-08-29)

Hi Joe,

Thnaks for your comments.

I have resolved the issue.

Created a variable TEST-1 with date value as 01/01/1900 using FormatDate() and created second variable TEST-2 and converted that 01/01/1900 as " ".

Its’ working…


remahesh (BOB member since 2006-08-09)