Stephen
I'd already figured out the list items thing but thanks anyway. I had
considered using select boxes but there are quite a few date fields on the
form and it would be a bit clunky.
It occurred to me that the TwoSelectsRelated tag could also be a good way to
ensure correct dates
were being passed.
Tristram
----- Original Message -----
From: "Stephen Moretti" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 1:50 PM
Subject: Re: CF doing strange things with dates
> Tristram,
>
> You're right about all the hashes/pound signs, but the 3 refers to the
item
> in the list rather than the list delimiter i.e.. the year.
>
> <cfset realdate =
>
createdate(listgetat(userdate,3,"-"),listgetat(userdate,2,"-"),listgetat(use
> rdate,1,"-"))>
>
> Should do the trick. Also you might want to look at the Locale functions
to
> ensure that CF handles your dates correctly.
>
> Generally I tend to make sure that users are entering valid dates, by
giving
> them 3 drop downs, one for day, month and year and checking that they
> haven't entered anything daft like the 31 Feb and make sure that the year
is
> restricted to sensible values (i.e.. Credit Card expiry date has to be in
> the future)
>
> Hope that helps
>
> Regards
>
> Stephen
>
> ----- Original Message -----
> From: "Tristram Charnley" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Wednesday, April 03, 2002 1:06 PM
> Subject: Re: CF doing strange things with dates
>
>
> > Umm. There are only 2 delimiters in the list and I don't think you need
> all
> > the # signs
> >
> > Tris
> >
> > ----- Original Message -----
> > From: "Jille Floridor" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Wednesday, April 03, 2002 12:42 PM
> > Subject: RE: CF doing strange things with dates
> >
> >
> > > It's probably not the most correct solution, but I use something like
> this
> > > to vaildate European dates:
> > > <cftry>
> > >
> > >
> >
>
#createdate(#listgetat("#userdate#",3,"-")#,#listgetat("#userdate#",2,"-")#,
> > > #listgetat("#userdate#",1,"-")#)#
> > >
> > > <cfcatch blablabla...
> > >
> > > </ctry>
> > >
> > > There are probably more efficient ways to do this, but this works fine
> for
> > > me. Hope it helps.
> > >
> > > Jille
> > >
> > >
> > > -----Original Message-----
> > > From: Tristram Charnley [mailto:[EMAIL PROTECTED]]
> > > Sent: woensdag 3 april 2002 13:37
> > > To: CF-Talk
> > > Subject: CF doing strange things with dates
> > >
> > >
> > > I want users to enter dates in forms using European format dates
> > > (dd/mm/yy).
> > >
> > > But CF is converting dates on or before the 12th of the month to the
US
> > > format - {d '2002-12-04'} while dates after the 12th are being
formatted
> > as
> > > European - {d '2002-04-13'}
> > >
> > > This happens with both CreateODBCDate and CFQUERYPARAM.
> > >
> > > Unless I'm missing something this makes Eurodate validation pretty
> > > pointless...
> > >
> > > Any suggestions?
> > >
> > >
> > >
> > > Tristram Charnley
> > > ---------------------------
> > > [EMAIL PROTECTED]
> > > Allaire Certified ColdFusion Developer
> > >
> > >
> > >
> > >
> > >
> >
>
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists