SyntaxFix
Write A Post
Hire A Developer
Questions
Since SQL Server Version 2012 you can use:
SELECT format(getdate(),'yyyyMMddHHmmssffff')