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));
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.