I am trying to use a start date and and end date in an executesql calculation and the result keeps coming back with 0. I can get it to work by a direct executesql using the dates, but would like the option to use an already defined field in the layout (dropdown calendar) like this:
Let (
[
begin= GetField("Search Start Date" ) ;
end = GetField("Search Stop Date" ) ;
$query = " select count(*) from "Office" where qualified='Yes' and "Client Flow Sales Agent"='Sales Guy' and "Client Flow Date In" BETWEEN ? AND ?
";
$result = ExecuteSQL ( $query ; "" ; "" ; begin ; end)
]; $result
)
Doe