I’m assuming your datetime variable is a VARCHAR
– this can be directly cast via CONVERT
:
Declare @YourVariable Varchar (15) = 'JAN 01 1996'
Select Convert(Date, @YourVariable)
1996-01-01
2
solved Converting datetime variable format
I’m assuming your datetime variable is a VARCHAR
– this can be directly cast via CONVERT
:
Declare @YourVariable Varchar (15) = 'JAN 01 1996'
Select Convert(Date, @YourVariable)
1996-01-01
2
solved Converting datetime variable format