DateTime display formats

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
MEngelbyDev
Posts: 33
Joined: Tue 06 Dec 2016 19:49

DateTime display formats

Post by MEngelbyDev » Wed 08 Mar 2017 18:20

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?

alexa

Re: DateTime display formats

Post by alexa » Mon 27 Mar 2017 16:52

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.

MEngelbyDev
Posts: 33
Joined: Tue 06 Dec 2016 19:49

Re: DateTime display formats

Post by MEngelbyDev » Thu 03 Aug 2017 19:31

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.

Drewsonian
Posts: 15
Joined: Fri 09 Nov 2012 20:10

Re: DateTime display formats

Post by Drewsonian » Thu 03 Aug 2017 19:39

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!

alexa

Re: DateTime display formats

Post by alexa » Fri 04 Aug 2017 11:11

Thank you for the replies.

Please let us know if any questions arise.

MEngelbyDev
Posts: 33
Joined: Tue 06 Dec 2016 19:49

Re: DateTime display formats

Post by MEngelbyDev » Wed 10 Mar 2021 15:55

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.

alexa

Re: DateTime display formats

Post by alexa » Thu 11 Mar 2021 13:29

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.

Post Reply