sql - Error while converting from getdate() function -


on command line

convert(varchar,getdate(),120)  

gives below error:

unknown argument '04:59:42.xml'

i saving data xml file. when use below command,proc works perfectly.

convert(varchar,getdate(),112) 

i need file save time.

you trying create file colon in name, not allowed. no way around restriction. however, can replace colons other characters when naming file, e.g.

replace(convert(varchar,getdate(),120),':','') 

Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -