Try this ;-) select Convert(Varchar(10), GetDate(), 103)
Yanik Lupien -----Message d'origine----- De : Colin Robinson [mailto:[EMAIL PROTECTED]] Envoy� : Monday, October 15, 2001 10:20 � : SQL Objet : RE: dateformat?? Do you mean like dateformat(mydate,"dd/mm/yyy") if you do what about SELECT RTRIM(CAST(DATEPART(day,date1) AS CHAR)) +'/'+RTRIM(CAST(DATEPART(month,date1) AS CHAR)) +'/'+RTRIM(CAST(DATEPART(year,date1) AS CHAR)) +'|'+RTRIM(CAST(DATEPART(day,date2) AS CHAR)) +'/'+RTRIM(CAST(DATEPART(month,date2) AS CHAR)) +'/'+RTRIM(CAST(DATEPART(year,date2) AS CHAR)) as date FROM table > -----Original Message----- > From: Bill Killillay [mailto:[EMAIL PROTECTED]] > Sent: 15 October 2001 14:58 > To: SQL > Subject: dateformat?? > > > In many programming languages there is a date format > function. What is the > equiv in SQL Server. > > I want to do a > select dateformat(date1) + '|' + dateformat(date2) as datelist > from mytable > etc, etc... > > Does anybody know what the dataformat syntax in SQL server is > and can I do > it in a select statement? > > Thanks, > B > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
