Below is a list of date & time styles supported by the CONVERT()
function in SQL Server. These are the styles that can be used as the third argument to indicate how the input value is formatted.
Tag: convert
Numeric Styles Supported by CONVERT() in SQL Server
Below is a list of numeric styles supported by the CONVERT()
function in SQL Server. These are the styles that can be used as the third argument to indicate how the input value is formatted.
How PARSE() Works in SQL Server
In SQL Server, the PARSE()
function returns the result of an expression, translated to the requested data type.
Basically, it enables us to parse a string expression to the specified data type. It’s intended for converting string values to either date/time or number types.
The PARSE()
function can be handy when attempting to convert with CAST()
or CONVERT()
fails. The PARSE()
function is able to parse the expression, and this may result in certain values being converted that wouldn’t normally be able to be converted.
How to Convert Dates in SQL Server
When it comes to converting date and time values in SQL Server, things can get a little complex. But in this article I hope to demystify this topic for anyone who’s confused when it comes to making conversions between dates and other data types, as well as changing the format of date/time values, and other considerations.
Let’s jump straight in.
Continue reading3 Ways to Convert an Integer to Decimal in SQL Server
Here are three options for converting an integer to a decimal value in SQL Server using T-SQL.
Continue readingData Type Precedence in SQL Server
Below is a list containing the SQL Server data types, in order of precedence.
Continue reading3 Ways to Convert a String to a Date in MongoDB
If you have a MongoDB collection with dates stored as strings, you can convert those into the Date BSON type if required.
Below are three ways to convert a string into a Date in MongoDB.
Continue reading3 Ways to Convert a Date to a String in MongoDB
MongoDB has a Date BSON type that allows you to store dates as dates.
You can also store dates as strings, if that’s what you need.
Taking it a step further, you can also convert a Date to a string.
This article presents three ways to convert a Date to a string in MongoDB.
Continue readingHow CONVERT() Works in MariaDB
In MariaDB, CONVERT()
is a built in function that converts a value to another data type. It takes a value of one type and returns a value of the specified type.
You provide the value as an argument when you call the function, as well as the type that you’d like it converted to.
CONVERT()
is similar to CAST()
.
How CAST() Works in MariaDB
In MariaDB, CAST()
is a built in function that converts a value to another data type. It takes a value of one type and returns a value of the specified type.
You provide the value as an argument when you call the function, as well as the type that you’d like it converted to.
CAST()
works similar to CONVERT()
.