Hi!
I've been asked to update some old SQL code and re-write it in SAS 9.4. The old SQL query has SQL Convert, DateAdd, and DateDiff functions that are not supported in SAS and I've been struggling with this for most of the day. I'm using Proc SQL / an explicit pass through to get the results into SAS 9.4 for me to do what I need to do with the data.
Specifically, here are some lines of exact code that I'm trying to manipulate. I believe it is a combination of SAS Input functions along with whatever the SAS equivalent is for the SQL DateAdd and SQL DateDiff:
Old SQL Syntax Line #1):
Convert(Date, APP_DATE_AJUDICATED)
New SAS replacement syntax:
Old SQL Syntax Line #2:
Convert(Date,DATEADD(MONTH, DATEDIFF(MONTH, -1, APP_DATE_AJUDICATED )+0, -1))
New SAS replacement syntax SAS:
Old SQL Syntax Line #3: Convert(Date, DateAdd(D,1, APP_DATE_AJUDICATED ))
New SAS replacement syntax:
I'm a bit over my head and haven't been able to make much progress on this this morning so I'm turning to the SAS community for assistance!
Please help!,
Andrew