About Conversion Functions

A Conversion function is used to modify query results by reformatting the data. You can use this type of function if you want to reformat the data to simplify it (e.g., you could remove unnecessary zeros from dates, where 01/07/2007 could be converted to 1/7/2007) or if you want to reformat the data so it appears as a different data type completely (e.g., you could spell out a month instead of representing the month with a number, where 01/07/2007 could be converted to January 7, 2007).

The following table provides a list of the Conversion functions that you can use in queries. The Oracle Function column contains the function you will need to use if you are using an Oracle schema. The SQL Server Function column contains the function you will need to use if you are using a SQL Server database.

Description Oracle Function SQL Server Function
Convert a number or date to a character TO CHAR CONVERT
Convert a character to a date TO DATE CONVERT
Convert a character to a number TO NUMBER CONVERT

Copyright © 2018 General Electric Company. All rights reserved.