Hi Everyone,
The below table is my portion of data set, What i want to do is to translate these sql codes to sas but it is quite diffcult to me.
can anyone help me with this. thanks a lot!!! My Data is char form
Julianday(SUBSTR(PTF.Premium_To_Date,1,4) || '-' || SUBSTR(PTF.Premium_To_Date,5,2) || '-01') - Julianday(SUBSTR(PTF.Premium_From_Date,1,4) || '-' || SUBSTR(PTF.Premium_From_Date,5,2) || '-01') > 180
Premium Premium
FromDate ToDate
| 20130101 | 20130131 |
| 20130101 | 20130131 |
| 20130101 | 20130131 |
| 20130101 | 20130131 |
| 20130101 | 20130131 |
| 20130101 | 20130131 |
| 20130101 | 20130131 |
| 20130101 | 20130131 |
| 20130101 | 20130131 |
Could you try below code, if you consider you have a dataset as have and you want to generate dataset want
data want;
set have;
Julianday(SUBSTR(Premium_To_Date,1,4) || '-' || SUBSTR(Premium_To_Date,5,2) || '-01') - Julianday(SUBSTR(Premium_From_Date,1,4) || '-' || SUBSTR(Premium_From_Date,5,2) || '-01') > 180;
run;
i am using studio version and there is no JULIANDAY Function, thx
Please post data in a usable form and show what you expect as result.
Steps to solve the problem
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.