BookmarkSubscribeRSS Feed
HeidiDT
Quartz | Level 8

Hi All

I have a VERY basic question to ask, I am sure I am missing something completely but for the life of me I can't see what.

I need to create a macro variable with the current datetime in a specific format. I am using an expression node, but when I preview the expression node, there is no value in the field.

 

Here is my code (I added some test variables, and all of these are empty when I preview the node):

 

Pre-processing:

string CurrDateTime
date test1
string test2

 

Expression:

CurrDateTime=formatdate(today(),"YYYYMMDD_hhmmss")
test1 = today()
test2="This is a test string"
varset ("Inp_CurrDateTime", CurrDateTime)

 

 

If anyone can tell me what obvious step I am missing, I would be very grateful.

Thanks!

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 0 replies
  • 834 views
  • 0 likes
  • 1 in conversation