BookmarkSubscribeRSS Feed
AshJuri
Calcite | Level 5

Hi everyone, 

 

I am a first time user of sas enterprise guide and I am trying to complete a simple calculation using this system. I have two date columns called "start date" and "end date". The formats of the date columns are in, for example, "08JUN2019". I calculated the difference between the two columns in order to produce the column "difference" which gives me the number of days that have elapsed. How would I calculate the average of the subtraction between "end date" and "start date" in sas enterprise guide? 

 

Thank you in advance,

3 REPLIES 3
Reeza
Super User

Use a summarize task. 

AshJuri
Calcite | Level 5

Okay, I used the "AVG" summary task. However, is it possible for this to be exported alongside the rest of the columns since it is only a single value?

Reeza
Super User

In that case, use QUERY builder and add it in as a calculated column. 

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

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1382 views
  • 0 likes
  • 2 in conversation