I am now working on loading some data from Snowflake using the REST API called SQL API. The issue is that Snowflake uses some weird format for fields with DATE type when creating the response JSON.
I have this example field metadata:
{
"name" : "...",
"database" : "...",
"schema" : "...",
"table" : "...",
"type" : "date",
"scale" : null,
"precision" : null,
"length" : null,
"collation" : null,
"nullable" : true,
"byteLength" : null
}
And in the resultset its value is "9245"
. Using the query in the browser I see that the actual value is 1995-04-25
.
What magic function decodes this integer back to a date?