← Articles
SQL Shack · February 06, 2020

SQL Server functions for converting a String to a Date

This article compares implicit and explicit conversion of text to date values in SQL Server. It demonstrates CAST, CONVERT, TRY_CAST, TRY_CONVERT and TRY_PARSE, examining how conversion behavior depends on input formats, language settings and available style or culture arguments.

Examples distinguish functions that raise conversion errors from alternatives that return NULL for unsuccessful conversions. The discussion helps developers handle inconsistent date representations in textual data.

Visit original source ↗

Search website

Type to search the portfolio.

↑ ↓ Navigate · Enter to open · Esc to close