Articles → SQL SERVER → Parse Function Of The SQL Server

Parse Function Of The SQL Server






Purpose





Syntax


parse([value] As [Data Type])



Example




declare @str as nvarchar(20) = '12/12/2023'
Declare @date as datetime
set @date = parse(@str as datetime)

select @date As [Date]



Output


Picture showing the output of the Parse function in SQL server
Click to Enlarge


Try_Parse Function





Posted By  -  Karan Gupta
 
Posted On  -  Monday, August 28, 2023
 
Updated On  -  Sunday, September 3, 2023

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250