SyntaxFix
Write A Post
Hire A Developer
Questions
If your SQL Server version supports the function FORMAT you could do it like this:
select format(getdate(), 'yyyy-MM-dd HH:mm:ss.fff')