DATA Step, Macro, Functions and more

Currentdatetime

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

Currentdatetime

Hi ,

 

I want to get current datetime19. format in sas.

 

12APR2018:05:54:46

 

How to get in dataset as a variable.

 


Accepted Solutions
Solution
‎04-13-2018 03:06 AM
Respected Advisor
Posts: 4,802

Re: Currentdatetime

Posted in reply to monikka1991_gmail_com
data demo;
  format want datetime19.;
  want=datetime();
run;

View solution in original post


All Replies
Super User
Posts: 10,623

Re: Currentdatetime

Posted in reply to monikka1991_gmail_com

Look at the datetime() function.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Solution
‎04-13-2018 03:06 AM
Respected Advisor
Posts: 4,802

Re: Currentdatetime

Posted in reply to monikka1991_gmail_com
data demo;
  format want datetime19.;
  want=datetime();
run;
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 76 views
  • 0 likes
  • 3 in conversation