I'm trying to create a data table variable that is a string representation of date in the format yyyy-mm-dd. I can define a variable in the proper format and set it as a data table variable as shown here.
datetime = "2021-08-01";
dt = Current Data Table();
dt << Set Table Variable( "LastRunDate", datetime );
However, I want to obtain the current datetime and convert it to a string in the format yyyy-mm-dd so that I can save it as a data table variable. What is the best/easiest way to accomplish this? I