sql - Converting datetime variable format -


i need in converting datetime variable format mmm dd yyyy datetime variable format yyyy-mm-dd

i'm assuming datetime variable varchar - can directly cast via convert:

declare @yourvariable varchar (15) = 'jan 01 1996'  select convert(date, @yourvariable) 

1996-01-01


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -