Convert 2 results

DATE / TIME ARITHMETIC WITH TEAMSQL

In this article, we will cover some interesting operations involving date and time data values in SQL. The SQL standard specifies the following date and time-related data types that must be present in relational databases: date, time, timestamp and interval. -  date: Represents a single day. Example 15/12/2018 -  time: Represents the time with hour, minutes, seconds. Example 09:14:30 -  timestamp: Represents a point in the timeline. Example 2018-12-15 09:14:30 -  interval: Repres...

Which One to Choose: Cast vs. Convert

When working with Microsoft’s SQL Server (and by extension, T-SQL), you have two options when making explicit conversions: CAST and CONVERT. Many people use them frequently, and quite often interchangeably, but there are some cases when one is a better choice than the other. This post covers the similarities and the differences between the two, as well as when you’re better off using one over the other. Similarities When doing explicit data conversions, CAST and CONVERT are available ...