BAQ using ExpirationDate > MyDateHere

I am writing an external BAQ on QuoteHed that has filter criteria as QuoteHed.ExpirationDate > MyDateHere. The problem is that no matter what format I use for MyDateHere it returns “Incompatible data types in expression or assignment.” The odd thing is that if I use a parameter and select a date using the GUI, then it executes ok. Or if I use the Today constant, it executes ok. But if I enter a date manually it fails.

What format do I need to enter for a date when choosing QuoteHed.ExpirationDate > ‘specified constant’?

What is the format of MyDateHere ?

If it is a string… you need to Convert using the valid format for your use…

ex: QuoteHed.ExpirationDate > convert(date, MyDateHere, 103
Pierre

ExpirationDate is a date, and MyDateHere has no format. When you create BAQ filter criteria you can chose from Specified Constant, Specified Expression, Specified Paramater, etc. but they have no datatype assigned. That is why I am asking how to enter it, what format do I need to use? What should the date look like so that I don’t get “Incompatible data types in expression or assignment.”

What is MyDateHere? I tought it was a parameter , and parameters you can define a format…that should work…

sorry … I am no help here…

Pierre

Arron,

I have found this format for dates in BAQ filter criteria to work for specified Constant.

01/01/2018

1 Like

Try this,

1 Like

Thank you for confirming that Chris. That is how I was entering them. Since this is an external BAQ and not a regular BAQ, perhaps there is something quirky about how it passes that field to the external database. In the end I started filtering by QuoteNum instead of ExpirationDate.