<cfset SetLocale("English (New Zealand)")> in application.cfm
..and just before your cfinsert:
<cfset Form.NoticeStartDate =
CreateODBCDate(LSParseDateTime(Form.NoticeStartDate))> etc
The LS is the important bit, invoking locale-specific date handling.
That should fix it!
> -----Original Message-----
> From: NZERN National Office [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 6 June 2002 1:53 p.m.
> To: CF-Talk
> Subject: Setting locale in application.cfm for DateFormat
>
>
> (I'm having problems getting my head round this)
>
> I want to insert dates into SQL7 tables (Hosting Server
> Locale is default or
> US English)
>
> in New Zealand 1st March 2002 is written as 1/3/2002
>
> The form I'm using puts it into the table as 3/1/2002
>
> I want to set Locale to English(New Zealand) in
> application.cfm at root dir
> so all forms with dates work correctly
>
> Thanks in advance for a simple explanation to a beginner.
>
> Mike
> ----------------------------------------------------
> NZERN National Office
> Mail: PO Box 9000, Christchurch
> (03) 338-5451
> E-mail: [EMAIL PROTECTED]
> http://www.bush.org.nz
> ----------------------------------------------------
>
>
> here is code from "now.cfm"
> --------------------------------------------------------------
> --------------
> --------
>
> <FORM name="form" method="POST"
> action="new_add.cfm?PersonID=#PersonID#">
> <Table>
> <TR>
> <TD valign="top" width="134">Date Start:
> </TD>
> <TD valign="top">
> <INPUT type="text" name="NoticeStartDate"
> value="#DateFormat( Now(),
> "d/m/yyyy")#">
> </TD>
> <TD valign="top" width="100">
> </TD>
> </TR>
> <TR>
> <TD valign="top" width="134">Date End:
> </TD>
> <TD valign="top">
> <INPUT type="text" name="NoticeEndDate"
> value="#DateFormat( Now() + 28,
> "d/m/yyyy")#">
> </TD>
> <TD valign="top" width="100">
> </TD>
> </TR>
> --------------------------------
> here is code from "new_add.cfm"
>
> <CFINSERT tablename="tblNotice_New" datasource="DataSQL" dbtype="ODBC"
> formfields="NoticeDate, NoticeTitle, NoticeRegionID, NoticeText,
> NoticeContact, NoticeStartDate, NoticeEndDate, PersonID, OrgID,
> NoticeKereru, NoticeWeb, NoticeAd>
> -----------------------------------
>
>
>
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
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