Try this
Replace(Field1, "0.", ".")
On Jun 12, 2001 at 1:33 PM, you wrote...
> I am building a csv file from a query:
>
> <cfoutput>
> <cfset NewFile = '#NewFile#' & '#Field1#,#Field2#,#Field3#,' & chr(10)>
> </cfoutput>
>
> Field2 is a text field in the database. Sometimes the value of the field is
> a decimal, i.e. .123
>
> When I output it to the csv it is coming through as 0.123 by default. When
> I look at it in the db it is stored as .123
>
> Any ideas how to remove the 0 when it is written into the .csv?
>
> I have tried a few functions (NumberFormat, ToString, Ucase - hoping to fool
> it into thinking it was a string ;) )
>
> Any ideas?
>
> Scott
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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