SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
User123
Calcite | Level 5

I wanted to know if the CENT_TM10 is greater than (COLL_TM1 + 15 minutes)

Data EC02;Set Ec01;

if cent_tm10 > coll_tm1 + 15 ;

Run;

I get all the records in EC01 again into EC02..

Any help..

Bob

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

SAS stores time in seconds. Use 15*60 to get 15 minutes.

View solution in original post

3 REPLIES 3
art297
Opal | Level 21

You didn't indicate what kind of fields cent_tm10 and coll_tm1 were.  If they are datatime fields they are measured in seconds thus you would have to change your comparison to that unit of measurement (i.e., times 60).

User123
Calcite | Level 5

time5. is the format that I have on all the time fields.

BOB

Tom
Super User Tom
Super User

SAS stores time in seconds. Use 15*60 to get 15 minutes.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 4876 views
  • 3 likes
  • 3 in conversation