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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -