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

Reply via email to