s = "20100420";
mid(s, 5, 2) & "/" & right(s, 2) & "/" & left(s, 4);

cheers,
barneyb

On Tue, Apr 27, 2010 at 8:32 AM, Che Vilnonis <[email protected]> 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:333154
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to