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));
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.