Closed heliocj closed 1 year ago
I think you've made a typo, because your screenshot says 2014-01-10 00:00:00.000
but your description says 2014-10-01 00:00:00
. It doesn't make much sense why there would be a jump from 1st October to 9th January.
But if it is just a 2 hour offset, that looks like a timezone issue where the timezone of your database is not the same as your application code. Have you tried using useUTC
option?
Setting the useUTC to false just made it back to work. Thank you.
There is an issue when trying to return the column typed as datatime with select to a const variable typed as Date. At the database have a data like "2014-10-01 00:00:00". If I execute the select at the database that is returning the correct data, but at nodejs that is returning like "2014-01-09T22:00:00.000Z". To get the right data I have to use format function and work with columns typed as string.
Expected behaviour:
Expected data returning at the right format and value.
Actual behaviour:
The simple SQL for test: "select * from table"
Configuration:
// paste relevant config here data at the database![image](https://github.com/tediousjs/node-mssql/assets/69656528/44ebfbe6-f59e-4938-a075-26e176f69275)
data at the nodejs
![image](https://github.com/tediousjs/node-mssql/assets/69656528/32405b98-f385-44ff-b951-393f6e5e5892)
Software versions