This works, except that if a job does not have more then one day in it, it
does not build a list.  If a job has two days it builds the list.  In my
query results, I just get a blank where there are only one date in the list.
Is there a way to dynamically list it so that I can get up to 5 days worth
of dates, but not loose any of the single either?  Make sense?

TIA,
B

-----Original Message-----
From: Colin Robinson [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 15, 2001 10:20 AM
To: SQL
Subject: 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
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to