datetime fields returned as date when time is 00:00:00
See original GitHub issueSetting a DATETIME field with the value 2019-10-01 00:00:00
Then retrieve the data using the execute command:
const [result] = connection.execute('SELECT * FROM my_table', [])
result will equal to ‘2019-10-01’ instead of ‘2019-10-01 00:00:00’ although it’s a DATETIME field and not merely a DATE
note that when using query the behavior is as expected
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Why does MySql format datetime microseconds as .000000?
The database is free to return date and datetime values however it likes. The creators of MySQL chose the most general format for...
Read more >datetime => how to have complete date with 00:00:00.000
Hi,. i work with sql server 2005 and i 'm a beginner. I have a table with a column datetime. in this table...
Read more >8.4: Data Type Formatting Functions - PostgreSQL
The PostgreSQL formatting functions provide a powerful set of tools for converting various data types (date/time, integer, floating point, ...
Read more >How to convert DateTime format from 00:00:00 to 23:59:59
I have converted a Date into DateTime format, and it is returning me the hour format in 00:00:00 but I want it to...
Read more >Data Lake Analytics:Date and time functions - Alibaba Cloud
EXTRACT extracts and returns the value of a specified datetime field from a datetime or interval value expression. Syntax: EXTRACT(unit FROM ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
any update on this ? let me know if there’s something i do to help out
Sure here is a standalone snippet
scratches.zip