[datadirect][odbc sybase wire protocal driver][sql server]incorrect syntax near'datepart'

hi,i am designing a form for the connectivity of sybase odbc.i have created an agent for this.

while i am running the agent i am getting the error as follows:

[datadirect][odbc sybase wire protocal driver][sql server]incorrect syntax near’datepart’

pls let me know any solutions for this.

thanking you,