sqlectron-gui icon indicating copy to clipboard operation
sqlectron-gui copied to clipboard

Problem with Casting on Sql Server Date Time Field

Open ghost opened this issue 4 years ago • 1 comments

When I run the following query I get the incorrect result in sqlectron. SELECT CAST(GETDATE() AS DATE)

Here's an image of the results of the query from sqlectron and ssms: Screen Shot 2020-07-16 at 10 15 44 AM Screen Shot 2020-07-16 at 10 16 02 AM

ghost avatar Jul 16 '20 16:07 ghost

Looking at this, it seems to fix this will require a larger rewrite of the underlying sqlectron-core library. Right now, the logic for rendering a value is relatively simple: https://github.com/sqlectron/sqlectron-gui/blob/593b75056bde23f20c18f88575a06a29fd50c7b4/src/renderer/utils/convert.js#L21-L47

The simplicity in the rendering here is a result that the underlying core does not surface meaningful information on what type a given column is and so that information must first be written into the core, which is not clear how much effort that will be.

MasterOdin avatar Oct 19 '20 03:10 MasterOdin