T-SQL

Conversion of some values to BIT

Converting numeric values looks like to be intuitive but it can still surprise you. Doing conversion from various different data types means that every value which isn’t 0 (zero) will be converted as TRUE. And that’s not something you will expect naturally. You can test this behavior by yourself. Simply…

Read more
SQL Server

CONVERT() datetime to string - Table of output values

I’m converting DATETIME values to string nearly every day when doing regular T-SQL development. After years I remember a lot of format parameter values to get the right string representation of input DATETIME value. But still time to time something specific is needed. This is why I have created a…