WHat we have always done is to use seperate form fields (select boxes) for
day/month/year, and then used createdate(form.year,form.monnth,form.day) in
calculations...
:> -----Original Message-----
:> From: Anthony Caroleo [mailto:[EMAIL PROTECTED]]
:> Sent: 05 December 2000 16:30
:> To: CF-Talk
:> Subject: Dateadd function problems with UK locale!
:>
:>
:> Hello All,
:>
:> I wonder if someone out there can help me? I am having a
:> horrible time with
:> the dateadd function using UK dates, I am acquiring a date value and
:> increment values from a form and then incrementing other
:> form values with
:> this date and increment values. My problem seems to occur
:> when the dates
:> are displayed out to the form in American format with the
:> wrong datepart
:> incremented, from what I can see the date is being treated
:> as a US date and
:> not my locale UK. Has anyone had any similar problems or
:> know of a solution
:> to this problem.
:>
:> I have included below a snippet from my code as an example
:> of the problem,
:> through my testing and debugging I have also noticed that
:> datepart function
:> also seems ignore the fact that my locale is UK. If I could
:> get datepart to
:> work then I could pass that value into dateadd but as in the
:> example below
:> datepart also uses the US date format.
:>
:> <html>
:> <head>
:> <title>Untitled</title>
:> </head>
:>
:> <body>
:>
:> Given UK date: 06/01/01
:> <cfoutput>Split into parts:
:> Year= #DatePart("yyyy","06/01/01")#
:> Month=#DatePart("m","06/01/01")#
:> Day=#DatePart("d","06/01/01")#
:> </cfoutput>
:> <p>
:> <cfset GetFirstSdate = CreateDate("01","01","06")>
:> <cfoutput>CreateDate yy=01,mm=01,dd=06: #getfirstsdate#</cfoutput>
:> <cfoutput>DateAdd 7 days: #DateAdd("d",7,getfirstsdate)#</cfoutput>
:>
:> </body>
:> </html>
:>
:> Any help would be greatly appreciated.
:>
:> Many Thanks in advance
:>
:> Anthony Caroleo
:>
:>
:> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
:> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
:>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists