1 Try this
begin
SetVariable('extract_date',FormatDateTime('dd/mm/yyyy',now-1));
Result:=true;
end;
Result:=false; => script failed
Result:=true; OK
2
select
CheckLog.AlertFlags,
CheckLog.Allowed,
CheckLog.ClubNumber,
CheckLog.CustomerID,
CheckLog.Date,
CheckLog.ID,
CheckLog.StationID
from
CheckLog
where
cast (floor(cast(Date as float)) as datetime) = '05/31/2010' <=== this part depends on sql server regional settings and it might fail or it might return wrong data
this one is better CONVERT(datetime,'05/31/2010',101)
or if you want to use variables CONVERT(datetime,'extract_date',101)
Mike