BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
zimcom
Pyrite | Level 9

 

Hi Community,

 

I have a dataset where I need only to change the red vs2 date to a day later  (in below the first vs2 date really should be 24APR2015:00:06:00) and the last vs2 date really should be 22NOV2017:00:04:00, while the other dates should remain the same.

How should I handle situation like this?  Thanks as always 

 

vs1vs2
23APR2015:23:51:0023APR2015:00:06:00
05MAY2015:13:00:0005MAY2015:12:59:00
06JUN2015:18:52:0006JUN2015:18:52:00
23AUG2015:23:32:0023AUG2015:23:30:00
10SEP2015:20:39:0010SEP2015:20:32:00
23SEP2015:21:48:0023SEP2015:21:44:00
07DEC2015:12:45:0007DEC2015:12:27:00
21NOV2017:23:40:0021NOV2017:00:04:00
1 ACCEPTED SOLUTION

Accepted Solutions
6 REPLIES 6
Tom
Super User Tom
Super User

Is there logic for why those two need to change? Or do you just want to test for any value on those dates?

zimcom
Pyrite | Level 9

@Tom

 

Thank you for inquiring, those values in red are the correct values, basically vs2 should start a few minutes after vs1, so the situation is vs1 and vs2 just happens to cross the midnight, while the other values have issues which I don't want to program to change, they need further investigation

zimcom
Pyrite | Level 9

@Kurt_Bremser

Thanks for inquiring. I plan to use 

vs1_2 = INTCK('hour',vs2,vs1);

vs1_2  = 23;

to indentify those values across the midnight.

 

zimcom
Pyrite | Level 9

@Kurt_Bremser

I should add 24 hours to vs2 to bring vs2 one day ahead of its current status, that is my plan, just like to consult the experts here   

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 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
  • 6 replies
  • 6057 views
  • 0 likes
  • 3 in conversation