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

 

Have

Randomization Date
2017-07-03
2017-07-04
2017-07-26
2018-06-07
2018-06-14
2018-06-17
2018-06-25
2018-06-28
2018-06-29
2019-07-09

 

Want 

Randomization DateNew Date
2017-07-032017-07-05
2017-07-042017-07-06
2017-07-262017-07-28
2018-06-072018-06-09
2018-06-142018-06-16
2018-06-172018-06-19
2018-06-252018-06-27
2018-06-282018-06-30
2018-06-292018-07-01
2019-07-092019-07-11
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26
new_date=randomization_date+2;

You can format new_date any way you want to make it readable.

--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Am I correct in understanding that you want to add two days to Randomization_Date?

 

Could you please tell us if Randomization_Date is a valid SAS date value which is a numeric variable, or is it a character string?

--
Paige Miller
zimcom
Pyrite | Level 9

Yes, adding 2 days. and Randomization_Date is a valid SAS numeric date value.  

PaigeMiller
Diamond | Level 26
new_date=randomization_date+2;

You can format new_date any way you want to make it readable.

--
Paige Miller

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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