11-23-2016 09:25 AM
The datepart function can also be used in PROC SQL.
if datepart(abc) <= datepart(xyz) <= datepart(abc)+7;
appears as a standalone statement (without a then ....) in a data step, it is called a subsetting if, and can be done in SQL in a where condition. If abc or xyz are variables that are newly created in the SQL, use the "calculated" keyword.
11-23-2016 09:48 AM
Thanks for your instant reply,
we need this to be converted into SQL server.
Then you will have to look for functional equivalents of the datepart() function in the MS SQL Server documentation.
11-23-2016 09:37 AM