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. 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 953 views
  • 0 likes
  • 2 in conversation