I get a raw data file that has two fields: Start_Date and Start_Time. They are initially String variables, where Start_Date is in MM/DD/YYYY and Start_Time is in hh:mm:ss formats.
I'd like to combine these into a single Date variable (MM/DD/YYY hh:mm:ss). Here is the syntax I'm using but it's clumsy:
String MyDate(A20).
Compute MyDate = Concat(CHAR.SUBSTR
(Start_Date, 4, 2), '-', CHAR.SUBSTR (Start_Date, 1,2), '-',
CHAR.SUBSTR (Start_Date, 7,4), ' ', Start_Time).
Execute.
Alter Type MyDate (DATETIME20).
Execute.