Sorry if this is a repost, but I looked in the archives for references to
this bug and couldn't find any. We have customers who are inputing their
Credit Card information into a form field. For reasons that are beyond my
control, we can't give them a drop down to select their month and year of
expiration. So invariably people input their data in the traditional credit
card date format of 08/02, or MM/YY. the problem is that Cold Fusion
refuses to recognize this format, instead when I try and format the data,
CF interprets the /01 as the day, not they year. So I get passed a form
field with a string in it that is something like 08/02

<cfset ccDate = parseDateTime(form.creditcard_date)>
<cfset finalDate = DateFormat(ccDate, "MM/YY")>

I have tried LSParseDateTime , CreateODBCDate,  and everything else I can
think of. No matter what I do, if the form field contains data in the form
of 08/02, CF screws up and interprets the date as 08/00. The wierd quirk is
that if the year is over 31, it works, but if it's under 32, it reads it as
2000.  Also, it doesn't matter if I change up the dateformat to MM/DD/YYYY
or anything else. It still misinterprets the YY part. 

I would appreciate any insight into this wierd bug. I know I can just write
a little parser to fix the problem, but I just can't believe that CF can't
handle such a common credit card convention. 


---Hondo---

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to