Hello, I am trying to convert a character date time stamp with time zone information into a date time variable. My date variable is stored in this format, "YYYY-MM-DD"T"HH24:MI:SS.ff3"Z."" Here is an example value from my data set: 2022-03-09T14:00:00Z. Ideally, I would like to change values to mmddyy10 or any date format. Here is one proc sql method I tried: proc sql; select to_char(to_timestamp_tz(2022-03-09T14:00:00Z, 'YYYY-MM-DD"T"HH24:MI:SS.ff3"Z"'), 'DD-MON- YY') FMT from rpt quit; Here is my error: 29 select to_char(to_timestamp_tz(2022-03-09T14:00:00Z, 'YYYY-MM-DD"T"HH24:MI:SS.ff3"Z"'), 'DD-MON-YY') FMT ___ 22 76 ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, ), *, **, +, ',', -, /, <, <=, <>, =, >, >=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=. ERROR 76-322: Syntax error, statement will be ignored. Any help is greatly appreciated!
... View more