BookmarkSubscribeRSS Feed
AZIQ1
Quartz | Level 8

Hi,

I am trying to calculate age using intck function and am getting "Log Window Full" pop up message (multiple times) during the  run, any insights what am I doing wrong here. The date formats are ddmmyy10. 

data test2 
set test1;
AgeR = intck('day',date1, date2);
put AgeR;

run;

5 REPLIES 5
ballardw
Super User

You PUT statement generates one line of output in the log for every record in your data set. If you are testing code I suggest using an option to only put a few values, possibly using a smaller test set or the data set option obs=.

Or remove the PUT.

Astounding
PROC Star

Secondarily (not affecting your original question), you don't need INTCK to calculate the number of days between two dates.  Sufficient:

 

AgeR = date2 - date1;

AZIQ1
Quartz | Level 8
This simple formula is not working somehow, do I need to change the format?
Reeza
Super User

@AZIQ1 wrote:
This simple formula is not working somehow, do I need to change the format?

Provide more details. 

Ksharp
Super User
options error=0;
data test2;
 ............


sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 770 views
  • 0 likes
  • 5 in conversation