Just do something like this:

<cfset str = "20100420" />
<cfoutput>

#DateFormat(CreateDate(MID(str,1,4),MID(str,5,2),MID(str,7,2)),'mm/dd/yyyy')#
</cfoutput>

On Tue, Apr 27, 2010 at 10:32 AM, Che Vilnonis <ch...@asitv.com> wrote:

>
> I'm working with an accounting database that stores order dates as a
> varchar
> (8) field. An example would be "20100420".
> Obviously, CF's dateformat chokes when used.
>
> Short of using a bunch of cfset statements with CF functions, how can I (in
> SQL preferrably or CF) easily format this string to "04/20/2010"?
>
> Thanks, Che
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333158
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to