I am trying to convert a string into a datetime in Sybase IQ. The string has this form: '20191211 11:49:00.565224 +0700'
I first try with Convert DATETIME
:
the following 2 queries fail:
SELECT CONVERT("DATETIME", '20191211 16:29:56.226560 +0000', 112) AS "TIME_dt"
SELECT CONVERT(DATETIME, '20191211 16:29:56.226560 +0000', 112) AS "TIME_dt"
However, when used in a query like
SELECT CONVERT("DATETIME", "TIME_", 112) AS "TIME_dt" FROM TABLE
and the column "TIME_" contains '20191211 16:29:56.226560 +0000'
then I get the result: 2019-12-11 00:00:00
and it correctly transformed 20191211
to 2019-12-11
Next I try with SELECT CONVERT( DATETIMEOFFSET , '20191211 11:49:00.565224 +0700')
and that works, but when I use it in a query like
SELECT CONVERT(DATETIMEOFFSET, "TIME_") AS "TIME_dt" FROM TABLE
I get an error with :
[Code: 21, SQL State: QFA2A] SQL Anywhere Error -1001030: Feature, Cast to Unknown TypeID (29) at line 1, is not supported.
-- (dflib/df_Heap.cxx 6835)
What is going on?
thanks