You can translate the question and the replies:

Mircrosoft Ajax Date Format

Hello, I have a Json Data source configured to get data from external application. I am seeing the data . But there are 2 cols, Updated At and Created At. values in those columns are coming in the format /Date(1589932800000)/ I tried creating a new field, used substr to parse out the 8 numbers to get to 15899328 and use cast function to convert to date. Not working. getting null values. Can anybody help how to convert this to a date format in Denodo Integration view? Thank you RM
20-05-2020 16:13:56 -0400

3 Answers

Hi, I would use some of the Denodo [Text Processing Functions]( such as SUBSTR, INSTR to extract date value(1589932800000) from the datasource format(/Date(1589932800000)/) and then apply Denodo [Type Conversion Function]( CAST to convert it to timestamp. Hope this helps!
Denodo Team
21-05-2020 05:59:50 -0400
I sliced the full number and tried conversion functions. No Luck.
 Edited on: 21-05-2020 13:16:26 -0400
Hi, The output datatype of SUBSTR is Text. When convert text to timestamp would result to NULL. In this case,I would first convert Text to Int8 and then to timestamp will yield the desired result. The Query would be similar as below `SELECT cast(cast(<your substring function result> AS INT8) AS TIMESTAMP) FROM ViewA;` Hope this helps!
Denodo Team
29-05-2020 05:38:18 -0400
You must sign in to add an answer. If you do not have an account, you can register here