Skip to main content
Skip table of contents

ETL+ Extract SQL Statement: CONVERT()

CONVERT() is specific to T-SQL. CAST() is ANSI standard.

The CONVERT function is specific to T-SQL and is not part of the ANSI standard. If you require a function that is platform agnostic then you would be better off using the CAST function as it is compatible with other database platforms. SQL Convert Function Examples and Alternatives [mssqltips.com].

Current DateTime in YYYY-MM-DD HH:MM:SS Format

SELECT
[column1],
1 AS [column2],
CONVERT(varchar(30), GETDATE() ) AS [column3]

FROM
[sourceTableName]

CODE
SELECT
    CONVERT(varchar(30), GETDATE() ) AS [column3]

FROM
     [sourceTableName]

Related Pages

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.