George, just want to check that it’s
a CF issue and that it isn’t caused by the db or it’s
ODBC driver.
just within CF code, you can convert it, maybe throw it in a dummy
query (queryNew()) and then convert and read it back and
it’s all fine?
If it isn’t, which part is causing the
grief – the lsDateFormat() at the start (my guess) or the display?
just
a thought
barry.b
From: George Lu
[mailto:[EMAIL PROTECTED]
Sent: Monday, 31 May 2004 11:42 AM
To: CFAussie Mailing List
Subject: [cfaussie] RE: SQL Server
date format (please help!)
Yes, I've set to
English(Australian). BTW, it's SQL Server 2000 on Windows Server 2003.
And this
"<cfset SQLDate = DateFormat(Form.CloseDate,
"yyyy/mm/dd")>" works for my other applications. It's quite
weird.
George
>>> [EMAIL PROTECTED] 31/05/04 11:33:24 >>>
Have you checked the regional setting (in control panel) on the
machines hosting your DB Server/CFMX server?
Make sure the correct locale is installed and set to English(Australian).
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stephen Bosworth
Application Development and Integration
Communication and Information Services
The University of Newcastle, Australia
Phone: 02 4921 6574
Fax: 02 4921 7087
Mobile: 0438 492518
Email: [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> [EMAIL PROTECTED] 31/05/2004 11:23:18 am >>>
Steve,
Thanks for your help. I've tried it but it still come with same result
(i.e. 7/6/2004 becomes 6/7/2004).
George
>>> [EMAIL PROTECTED] 31/05/04 11:14:00 >>>
george,
whenever i am inserting dates passed from a form i do this in the
insert:
#CreateODBCDate(lsparsedatetime(form.news_finish_date))#
of course for this to work i have also set my locale in the
application.cfm:
<cfsilent><cfoutput>#Setlocale("English
(Australian)")#</cfoutput></cfsilent>
try that and see how you go, but i have never had an issue since adding
the lsparsedatetime function.
steve
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of George Lu
Sent: Monday, 31 May 2004 11:05 AM
To: CFAussie Mailing List
Subject: [cfaussie] SQL Server date format (please help!)
Hi,
I've been driving crazy with this date issue. We've upgraded our Access
dbs to SQL Server recently. We have form input using Aussie date format:
dd/mm/yyyy and is same in the database (I've set the default language to
0 - international in SQL Server). However when I use LSDateFormat to
display the date it always change to American format: mm/dd/yyyy (e.g.
7/6/2004 becomes 6/7/2004). I've tried some options:
<cfset SQLDate = DateFormat(Form.CloseDate, "yyyy/mm/dd")>
OR
<cfscript>
theDate = Attributes.formfield;
firstSeparator = find("/",theDate,0);
theDay = left(theDate,firstSeparator-1);
theYear = right(theDate,4);
remaining = Right(thedate,len(thedate)-firstseparator);
theMonth = left(remaining,find("/",remaining)-1);
Caller.SQLDate = createdate(theYear,theMonth,theDay);
</cfscript>
<cfset newSQLDate = DateFormat(variable.SQLDate, "dd/mm/yyyy")>
However, none of them work! Please help!
Thanks in advanced.
George
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
AMES (Adult Multicultural Education Services)
www.ames.net.au
Disclaimer
**********************************************************************
This email and any attachments may be confidential.
If received in error, please contact us and delete all copies.
Before opening or using attachments you should check them for viruses
or defects.
Regardless of any loss, damage or consequence, whether caused by the
negligence of the sender or not, resulting directly or indirectly from
the use of any attached files our liability is limited to resupplying
any affected attachments.
Any representations or opinions expressed are those of the individual
sender, and not necessarily those of Adult Multicultural Education
Services (AMES).
**********************************************************************
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
AMES (Adult Multicultural Education Services)
www.ames.net.au
Disclaimer
**********************************************************************
This email and any attachments may be confidential.
If received in error, please contact us and delete all copies.
Before opening or using attachments you should check them for viruses
or defects.
Regardless of any loss, damage or consequence, whether caused by the
negligence of the sender or not, resulting directly or indirectly from
the use of any attached files our liability is limited to resupplying
any affected attachments.
Any representations or opinions expressed are those of the individual
sender, and not necessarily those of Adult Multicultural Education
Services (AMES).
**********************************************************************
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
AMES (Adult Multicultural Education Services)
www.ames.net.au
Disclaimer
**********************************************************************
This email and any attachments may be confidential.
If received in error, please contact us and delete all copies.
Before opening or using attachments you should check them for viruses
or defects.
Regardless of any loss, damage or consequence, whether caused by the
negligence of the sender or not, resulting directly or indirectly from
the use of any attached files our liability is limited to resupplying
any affected attachments.
Any representations or opinions expressed are those of the individual
sender, and not necessarily those of Adult Multicultural Education
Services (AMES).
**********************************************************************
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
|