Hi every body: I'm new in Sql server. I AM TRYING TO CONVERT A DATE IN DAY-MONTH- YEAR ' ( '+ Convert(Date, '2011/08/15','ddmmyyyy' )+' ) TOT ( '+ Convert(Date, '2011/12/08','dd-mm-yyyy' ) +' ) 'PERIODE, But I'm getting this error:"Argument data type varchar is invalid for argument 3 of convert function". Can any body help me with this???
Read this : [Books Online - Cast And Convert] 1. You can't supply a format string to the CONVERT function - the supported formats are detailed in that link. 2. You can't concatenate a string and a Date like that - you need to Cast/Convert your date to a char type. 3. Why are you trying to convert a string '2011/08/15' to a Date, only to concatenate it into another string? Doesn't make sense, so I assume you are not telling us the true problem? :