Closed netofri closed 6 years ago
If the data type in the result set is a SQL_DATETIME or SQL_TIMESTAMP then it will go through the conversion to a Date object. There is no way around this other than hacking the source of the node-odbc project.
However, you might be able to change your query so that it is a string data type in the result set:
select convert(varchar(100), MyDateField) as date from MyTable
Not sure what database you are using, so that query may need to be different.
Using select convert(varchar(100), MyDateField)
did the trick (Sybase IQ), though I was hoping there was a way to configure the module to not convert such fields.
Thanks
When getting results from a query, datetime strings such as
2018-05-26 21:34:00.000
are automatically converted to JSDate
objects.Is there a way to get the results back as a raw string, they way it is saved in the DB, without any conversion?
Thanks