Techno Crazzyyyy Techno Crazzyyyy - 5 months ago 23
SQL Question

Cast DateTime column value in to DD MM YYYY hh:mm:ss:SSS format in SQL

I want to convert to current datetime format into "DD MM YYYY hh:mm:ss:SSS", is there any logic that I need to write or any predefined variable exist in SQL.

Answer

You can use below mentioned code

select CONVERT(VARCHAR(24),GETDATE(),113)

and for more format look into SQL Code