MySQL CONVERT Function

Example

Convert a value to a DATE datatype:

SELECT CONVERT("2017-08-29", DATE);

Definition and Usage

The CONVERT() function converts a value into the specified datatype or character set.

 

Syntax

CONVERT(value, type)

OR:

CONVERT(value USING charset)

Continue reading MySQL CONVERT Function

MySQL CONV Function

Example

Convert a number from numeric base system 10 to numeric base system 2:

SELECT CONV(15, 10, 2);

Definition and Usage

The CONV() function converts a number from one numeric base system to another, and returns the result as a string value.

Note: This function returns NULL if any of the parameters are NULL.

 

Syntax

CONV(number, from_base, to_base)

Continue reading MySQL CONV Function