BookmarkSubscribeRSS Feed
4301
Calcite | Level 5
rescale time variable from days to years;
years=LENFOL/365.25;
run;

it showed an error after running this command, is there any mistake in the command?

1 REPLY 1
PGStats
Opal | Level 21

The first code line of code is not valid SAS syntax. If you intend it as a comment, it should start with an asterisk (*). Moreover, the code should be part of a data step, i.e. it should start with a data statement. You must also tell SAS where to get the value for LENFOL, likely with a set statement.

 

data myNewDataset;

set myOldDataset;

* Rescale time variable from days to years;

years = lenfol / 365.25;

run;

PG

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 649 views
  • 0 likes
  • 2 in conversation