Hi I have a table that I need to determine the min and max time of 2 or 3 data time points...that is limited within hour of each point if it's greater I excluded
my data looks like this
id. Number. Start time. End time
1a. 23. 01/01/16. 11:01:00. 01/01/16 11:05:11
1a. 24. 01/01/16 11:02:00. 01/01/16 11:06:16
1a. 25. 01/01/16. 12:00:00. 01/0116 12:07:00
what I need here is just number 23 and 24 sine they over lap the 25 it exceeds the hour from the first 2 ....I would need 23 and 24 in one roll
id. Number. Start time. End time. Id. Number. Start time. end time
1a. 23. 01/01/16. 11:01:00. 01/01/16 11:05:11. 1a 24 01/01/16. 11:02:00. 01/01/16 11:06:16
I would need the min start time of number and max end time from number first
thanks in advance
And if there was 4 overlap how would you want it to look like? Each entry into a group?
You can use the lag function to create groups and determine if there's an overlap. Once your groups are assigned you can then use various transpose mechanisms to transpose your data.
Can you have multiple overlaps?
What happens when there's no overlaps?
What do you want the final dataset to look like for all records, include only overlaps?
And if there was 4 overlap how would you want it to look like? Each entry into a group?
You can use the lag function to create groups and determine if there's an overlap. Once your groups are assigned you can then use various transpose mechanisms to transpose your data.
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!
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.