Cold Fusion in general likes dates to be in US format.

It is a sensitive area in which your application may seem to work on most
days of the year :)

I try to pass dates around in the format 'dd/MMM/yyyy' as in 03/Apr/2002
this way databases don't get confused and all processes cannot
'misunderstand' a date.

Jared Clinton
NEC Australia



-----Original Message-----
From: Simon Whittaker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 3 April 2002 11:10 PM
To: CF-Talk
Subject: Re: CF doing strange things with dates


why not use cf_cal, not sure about cross browser compatability but it is
worth checking it out. you can then make the text box read only to ensure
that the user cannot edit the date that is inserted. Is available in the
developers gallery at macromedia.com

HTH

Simon
----- Original Message -----
From: "Tristram Charnley" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 2:14 PM
Subject: Re: CF doing strange things with dates


> 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
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> 

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to