babelfish_extensions
babelfish_extensions copied to clipboard
DATEDIFF() T-SQL function does not recognize 'weekday' and 'dw' units
In Babelfish, the DATEDIFF() BIF does not recognize the 'weekday' and 'dw' units. All of the below examples are valid in SQL Server. NB. 'weekday' seems to be undocumented: https://github.com/MicrosoftDocs/sql-docs/blob/live/docs/t-sql/functions/datediff-transact-sql.md.
1> select datediff(weekday, getdate(), getdate())
2> go
Msg 16801924, Level 16, State 1, Server BABELFISH, Line 1
syntax error at or near "weekday"
1> select datediff(dw, getdate(), getdate())
3> go
Msg 16801924, Level 16, State 1, Server BABELFISH, Line 1
syntax error at or near "dw"