I need to populate a field called next instalment date and the field I'm have is current instalment date in the format date9. e.g 21Dec2019, I need to populate a field next instalment date using the current instalment date, I needs to display as 21Jan20.
this looks like it might work, I ran the statement
nextdate = intnx('month',InstalmentDate,1,'s');
however it populates a Numeric field and not in a date format. I might be using the code incorrect. I apologies, but I'm very new and teaching myself the coding.
If you create a new variable, you need to assign a date display format to make the result of the calculation human-readable. A SAS date value is a count of days from 1960-01-01, so today's date is 21935.
Add this to the code
format nextdate date9.;
and you'll get the "default" SAS date format. Others can be found in the documentation (section Date and Time).