Hi ,
I need help creating one dataset which should contain two variables
B_date = today's date and start time 12:00:00 am
E_date = today's date and end time 11:59:59 pm
Thanks in advance.
Please below code.
data temp1;
b_date=dhms(today(),0,0,0);
e_date=dhms(today(),23,59,59);
format b_date e_date datetime.;
put b_date e_date;
run;
Hi @kajal_30
I you only need macrovariables, you can define a %let statement:
%let b_date=%sysfunc(dhms(%sysfunc(today()),0,0,0));
%let e_date=%sysfunc(dhms(%sysfunc(today()),23,59,59));
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 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.