Help with an Action Item SQL Query

Just in case there isn’t an easy way to cast to a SmallDateTime, I was trying to get the database function solution to work. I made a new function which returns a SmallDateTime, but I am running into the same problem I had earlier.

[quote]08/13/09 11:29:04
Group Execution Error
Error executing item GetStartTime: ERROR [42000] [Microsoft][SQL Native Client][SQL Server]Incorrect syntax near ‘2009’.[/quote]
Any ideas on what FSQL is complaining about? Here is what I am trying now…

dbo.SmallDateTime({startTime_0}, {startTime_1}, {startTime_2}, {startTime_3}, {startTime_4});

[code]-- returns a SmallDateTime value for the date and time specified.
CREATE FUNCTION SmallDateTime(@Year int, @Month int, @Day int, @Hour int, @Minute int)
RETURNS SmallDateTime

AS
BEGIN
RETURN dbo.Date(@Year,@Month,@Day) + dbo.Time(@Hour, @Minute, 0)
END
GO[/code]
Here is the stack trace if that helps any…

[quote]Error executing item GetStartTime: ERROR [42000] [Microsoft][SQL Native Client][SQL Server]Incorrect syntax near ‘2009’.
at FactorySQL.Items.AccessoryActionItem.Execute(EvaluationToken Token)
at FactorySQL.Groups.FSQLGroup.EvaluateActionItems(Boolean Triggered, EvaluationToken EvalToken)
at FactorySQL.Groups.FSQLGroup.InternalExecute(EvaluationToken EvalToken)
ERROR [42000] [Microsoft][SQL Native Client][SQL Server]Incorrect syntax near ‘2009’.
at FactorySQL.Items.AccessoryActionItem.Execute(EvaluationToken Token)
at FactorySQL.Groups.FSQLGroup.EvaluateActionItems(Boolean Triggered, EvaluationToken EvalToken)
at FactorySQL.Groups.FSQLGroup.InternalExecute(EvaluationToken EvalToken)
[/quote]Thanks for the help.
–HandledException