Page 1 of 1

DateTime display formats

Posted: Wed 08 Mar 2017 18:20
by MEngelbyDev
Under Tools / Options / Data Editor / Formatting there are a number of predefined format strings for 3 different data types: Date, DateTime, and Floating point numbers. It's good that we can change the format string if a custom format is wanted. Of which I have done for displaying microseconds for the DateTime type.

Unless I am doing something incorrect, when a format string in chosen, that format appears to apply to all like data types when being displayed in any Data Editor (example many results grids from different SQL statements). My question is why isn't the precision determined from the column data type?

According to BOL, the precision of SmallDateTime is 1 minute with typical rounding rules. DateTime the precision is microseconds with unique rounding rules. DateTime2 the default precision is 100 nanoseconds or 10 to the power of -7. In addition, the precision of fractional seconds for DateTime2 can be specified by the user. In addition, if the user does a CAST or CONVERT to a specific precision for a DateTime type in a SELECT, that one-format-fits-all for DateTime is applied when displayed.

Is this as designed? Am I doing something wrong? Or is this on the bug list to be fixed at a later date?

Re: DateTime display formats

Posted: Mon 27 Mar 2017 16:52
by alexa
Sorry for the delay on this.

We will fix this issue in the next product build and will notify you once it's available for downloading.

Re: DateTime display formats

Posted: Thu 03 Aug 2017 19:31
by MEngelbyDev
I've installed the upgraded version 5.5.196.

By default, the datetime display format follows the precision of the datatype now. Even when CAST or CONVERT is used. This is quite helpful. Thank you and thanks to the developer that spent the time to clean that up. Little things like this really do improve the utility of the program.

Re: DateTime display formats

Posted: Thu 03 Aug 2017 19:39
by Drewsonian
MEngelbyDev wrote:I've installed the upgraded version 5.5.196.

By default, the datetime display format follows the precision of the datatype now. Even when CAST or CONVERT is used. This is quite helpful. Thank you and thanks to the developer that spent the time to clean that up. Little things like this really do improve the utility of the program.
Same thing here, thank you for changing this!

Re: DateTime display formats

Posted: Fri 04 Aug 2017 11:11
by alexa
Thank you for the replies.

Please let us know if any questions arise.

Re: DateTime display formats

Posted: Wed 10 Mar 2021 15:55
by MEngelbyDev
The version 6.0.330 has lost this quality-of-life improvement. If you could in a future version, please restore the display of the datetime values to the precision of the datatype. Thank you.

Re: DateTime display formats

Posted: Thu 11 Mar 2021 13:29
by alexa
Could you please provide us the actual and expected results?

Screenshots would be also of help.

You can send the reply straight to our support system at supportATdevartDOTcom.