RE: CF Dates with MX 6.1 ?

2004-06-16 Thread Ian Vaughan
Thanks Pascal it works, changed the format of the date around to
dd/mm/ and placed the date inserts in as CFQUERYPARAM.



From: Pascal Peters [mailto:[EMAIL PROTECTED] 
Sent: 16 June 2004 10:14
To: CF-Talk
Subject: RE: CF Dates with MX 6.1 ?

I am willing to invest some time in helping people on this list, but at
least they should listen. Use TO_DATE(). Let's say the date comes in a
dd/mm/ format:

DON'T reformat it and when you insert it do
TO_DATE('#thedate#','DD/MM/'). Do that in ALL your queries (not just
UPDATE but also INSERT). And PLEASE USE CFQUERYPARAM. (I didn't type it
in the example because I'm tired of typing it)

The actual error is that you format it as a US date and Oracle is
expecting a European date.

Pascal

> -Original Message-
> From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
> Sent: woensdag 16 juni 2004 10:55
> To: CF-Talk
> Subject: RE: CF Dates with MX 6.1 ?
> 
> Still Recieving the error
>  
> Error Occurred While Processing Request 
> 
> Error Executing Database Query. 
> 
> [Macromedia][Oracle JDBC Driver][Oracle]ORA-01843: not a valid month 
>   
> The error occurred in C:\Inetpub\wwwroot\CFIDE\PollPopup.cfm: line 130
> 
> 128 : '#DNAME#',
> 129 : '#ENAME#',
> 130 : '#ARCHIVE#' )
> 131 :  
> 132 : 
> 
> 
> SQL INSERT INTO POLL (POLL_ID, AUTHOR, STARTDATE, ENDDATE,
> ACTIVE, POLLTYPE, QUESTION, ANAME, BNAME, CNAME, DNAME, 
> ENAME, ARCHIVE ) VALUES ('england04', '121.100.25.2', 
> '06-15-2004', '06-25-2004', 'yes',
> 'Y', 'Will this poll work ?', '', '', '', '', '', 'NO' ) 
> DATASOURCE    poll 
> VENDORERRORCODE    1843 
> SQLSTATE    HY000 
> Please try the following: 
> 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: CF Dates with MX 6.1 ?

2004-06-16 Thread Pascal Peters
I am willing to invest some time in helping people on this list, but at
least they should listen. Use TO_DATE(). Let's say the date comes in a
dd/mm/ format:

DON'T reformat it and when you insert it do
TO_DATE('#thedate#','DD/MM/'). Do that in ALL your queries (not just
UPDATE but also INSERT). And PLEASE USE CFQUERYPARAM. (I didn't type it
in the example because I'm tired of typing it)

The actual error is that you format it as a US date and Oracle is
expecting a European date.

Pascal

> -Original Message-
> From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
> Sent: woensdag 16 juni 2004 10:55
> To: CF-Talk
> Subject: RE: CF Dates with MX 6.1 ?
> 
> Still Recieving the error
>  
> Error Occurred While Processing Request 	
> 
> Error Executing Database Query. 
> 
> [Macromedia][Oracle JDBC Driver][Oracle]ORA-01843: not a valid month 	
>  	
> The error occurred in C:\Inetpub\wwwroot\CFIDE\PollPopup.cfm: line 130
> 	
> 128 : 			'#DNAME#',
> 129 : 			'#ENAME#',
> 130 : 			'#ARCHIVE#' )
> 131 : 		 
> 132 : 			
> 
> 
> SQL	    INSERT INTO POLL (POLL_ID, AUTHOR, STARTDATE, ENDDATE,
> ACTIVE, POLLTYPE, QUESTION, ANAME, BNAME, CNAME, DNAME, 
> ENAME, ARCHIVE ) VALUES ('england04', '121.100.25.2', 
> '06-15-2004', '06-25-2004', 'yes',
> 'Y', 'Will this poll work ?', '', '', '', '', '', 'NO' ) 	
> DATASOURCE	   poll	
> VENDORERRORCODE	   1843	
> SQLSTATE	   HY000	
> Please try the following: 	
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: CF Dates with MX 6.1 ?

2004-06-16 Thread Ian Vaughan
Still Recieving the error

 
Error Occurred While Processing Request 	

Error Executing Database Query. 

[Macromedia][Oracle JDBC Driver][Oracle]ORA-01843: not a valid month 	
 	
The error occurred in C:\Inetpub\wwwroot\CFIDE\PollPopup.cfm: line 130
	
128 : 			'#DNAME#',
129 : 			'#ENAME#',
130 : 			'#ARCHIVE#' )
131 : 		 
132 : 			


SQL	    INSERT INTO POLL (POLL_ID, AUTHOR, STARTDATE, ENDDATE,
ACTIVE, POLLTYPE, QUESTION, ANAME, BNAME, CNAME, DNAME, ENAME, ARCHIVE )
VALUES ('england04', '121.100.25.2', '06-15-2004', '06-25-2004', 'yes',
'Y', 'Will this poll work ?', '', '', '', '', '', 'NO' ) 	
DATASOURCE	   poll	
VENDORERRORCODE	   1843	
SQLSTATE	   HY000	
Please try the following: 	

 
These are the only date lines being used on the pollpopup.cfm page, what
could be causing the above date error on MX ??

 



 


 




 


 Admin Add/Edit/Delete

 
<br>
function popup(url) {<br>
<br>
 <br>
window.open(url,'EditWindow','toolbar=yes,location=no,directories=no,sta<br>
tus=no,menubar=no,scrollbars=yes,resizable=yes,width=530,height=450');<br>
  }<br>
  <br>
function getanswer(url) {<br>
  if (confirm("Are you sure you want to delete this item?"))<br>
  self.location=url;<br>
  }<br>
  

 


 
   

 SELECT *
 FROM #tablename#
 where poll_ID = '#id#'




 
  
  DELETE 
  FROM #tablename#
  WHERE poll_id = '#id#'  
  
  
  
  
  Deletion Successful.
  
  
 window.opener.focus();">
  
  
  
 
 
   
    
   
  

 
   
 

   
   
   
   INSERT INTO #tablename# 
   (POLL_ID,
   AUTHOR,
   STARTDATE,
   ENDDATE,
   ACTIVE,
   POLLTYPE,
   QUESTION,
   ANAME,
   BNAME,
   CNAME,
   DNAME,
   ENAME,
   ARCHIVE )
    
   VALUES 
   ('#poll_id#', 
   '#author#',
   '#formatted_date1#',
   '#formatted_date2#',
   '#ACTIVE#',
   '#POLLTYPE#',
   '#QUESTION#',
   '#ANAME#',
   '#BNAME#',
   '#CNAME#',
   '#DNAME#',
   '#ENAME#',
   '#ARCHIVE#' )
   
   
   
   
   
   Addition Successful.
   
   
 window.opener.focus();">
   
  
   
   
   
   You've entered an invalid Start or End date.
   Hit your back button to re-edit and don't do it again!!!. 
   
   
  
  
 
 

 
   
  
   
 

 
   
    Update #tablename#
    SET STARTDATE=TO_DATE('#startdate#', 'MM-DD-'),
    enddate=TO_DATE('#enddate#', 'MM-DD-'),
    ACTIVE='#ACTIVE#',
    POLLTYPE='#POLLTYPE#',
    QUESTION='#QUESTION#',
    ANAME='#ANAME#',
    BNAME='#BNAME#',
    CNAME='#CNAME#',
    DNAME='#DNAME#',
    ENAME='#ENAME#',
    ARCHIVE='#ARCHIVE#'    
    WHERE Poll_ID = '#poll_id#'
 
   
   
   
   Update Successful.
   
   
 window.opener.focus();">
   
  
   
   
   
   You've entered an invalid Start or End date.
   Hit your back button to re-edit.   
   
   
  
  
  
 

 
 

________________

From: Pascal Peters [mailto:[EMAIL PROTECTED] 
Sent: 15 June 2004 17:19
To: CF-Talk
Subject: RE: CF Dates with MX 6.1 ?

Use that format in conjunction with TO_DATE() 

> -Original Message-
> From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 15 juni 2004 17:40
> To: CF-Talk
> Subject: RE: CF Dates with MX 6.1 ?
> 
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166692
> ---
> mm/dd/
> 
> 
> 
> From: Pascal Peters [mailto:[EMAIL PROTECTED]
> Sent: 15 June 2004 16:27
> To: CF-Talk
> Subject: RE: CF Dates with MX 6.1 ?
> 
> 
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166688
> ---
> What format is startdate in ? 
> 
> > -Original Message-
> > From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
> > Sent: dinsdag 15 juni 2004 15:59
> > To: CF-Talk
> > Subject: RE: CF Dates with MX 6.1 ?
> > 
> > Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166670
> > ---
> > Doug
> >  
> > How would I change the following two lines to make it 
> > compatible with mx 6.1? Because it does not like the 
> > createodbcdate ???
> >  
> >  
> > "MM-DD-")>
> >  
> > "MM-DD-")>
> > 
> 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: CF Dates with MX 6.1 ?

2004-06-15 Thread Douglas.Knudsen
sorry, had to actually work  ^_^

Why use CreateODBC date at all?  I never use it myself.  

 
this is incorrect

   

startdate() is not a function.  should be

 

   

Now, is startdate and enddate input from the user?

 
Doug

-Original Message-
From: Ian Vaughan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 15, 2004 9:22 AM
To: CF-Talk
Subject: RE: CF Dates with MX 6.1 ?

Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166648
---
Just these letting me down


"MM-DD-")>
   
"MM-DD-")>

I have tried

   
   

but am recieving 

Entity has incorrect type for being called as a function. 

The symbol you have provided startdate is not the name of a function. 



From: Pascal Peters [mailto:[EMAIL PROTECTED] 
Sent: 15 June 2004 11:23
To: CF-Talk
Subject: RE: CF Dates with MX 6.1 ?

Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166621
---
> Pascal
>  
> This is the original code, and you are correct its in US Format
>  
> 
>  
> WHERE startdate <= #createodbcdate(formatted_date)#
>  
> So change it to 
>  
> WHERE STARTDATE <= TO_DATE(
> value="#formatted_date#">,'DD/MM/')
>  
> Is this correct ??? 

No, the mask has to match  the date format so:
WHERE STARTDATE <= TO_DATE(
value="#formatted_date#">,'MM/DD/')

> would I have to change the following line
>  
>  ???
> 

You don't have to, but you could do


WHERE STARTDATE <= TO_DATE(
value="#formatted_date#">,'-MM-DD')

You can pretty much do what you want as long as the mask in TO_DATE
matches the date format!

Pascal 
 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Dates with MX 6.1 ?

2004-06-15 Thread Pascal Peters
Use that format in conjunction with TO_DATE() 

> -Original Message-
> From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 15 juni 2004 17:40
> To: CF-Talk
> Subject: RE: CF Dates with MX 6.1 ?
> 
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166692
> ---
> mm/dd/
> 
> 
> 
> From: Pascal Peters [mailto:[EMAIL PROTECTED]
> Sent: 15 June 2004 16:27
> To: CF-Talk
> Subject: RE: CF Dates with MX 6.1 ?
> 
> 
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166688
> ---
> What format is startdate in ? 
> 
> > -Original Message-
> > From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
> > Sent: dinsdag 15 juni 2004 15:59
> > To: CF-Talk
> > Subject: RE: CF Dates with MX 6.1 ?
> > 
> > Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166670
> > ---
> > Doug
> >  
> > How would I change the following two lines to make it 
> > compatible with mx 6.1? Because it does not like the 
> > createodbcdate ???
> >  
> >  
> > "MM-DD-")>
> >  
> > "MM-DD-")>
> > 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Dates with MX 6.1 ?

2004-06-15 Thread Ian Vaughan
Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166692---mm/dd/



From: Pascal Peters [mailto:[EMAIL PROTECTED] 
Sent: 15 June 2004 16:27
To: CF-Talk
Subject: RE: CF Dates with MX 6.1 ?

Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166688
---
What format is startdate in ? 

> -Original Message-
> From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 15 juni 2004 15:59
> To: CF-Talk
> Subject: RE: CF Dates with MX 6.1 ?
> 
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166670
> ---
> Doug
>  
> How would I change the following two lines to make it 
> compatible with mx 6.1? Because it does not like the 
> createodbcdate ???
>  
>  
> "MM-DD-")>
>  
> "MM-DD-")>
> 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Dates with MX 6.1 ?

2004-06-15 Thread Pascal Peters
Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166688---What format is startdate in ? 

> -Original Message-
> From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 15 juni 2004 15:59
> To: CF-Talk
> Subject: RE: CF Dates with MX 6.1 ?
> 
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166670
> ---
> Doug
>  
> How would I change the following two lines to make it 
> compatible with mx 6.1? Because it does not like the 
> createodbcdate ???
>  
>  
> "MM-DD-")>
>  
> "MM-DD-")>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Dates with MX 6.1 ?

2004-06-15 Thread Ian Vaughan
Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166670---Doug

 
How would I change the following two lines to make it compatible with mx
6.1? Because it does not like the createodbcdate ???

 
"MM-DD-")>
 
"MM-DD-")>




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 15 June 2004 14:15
To: CF-Talk
Subject: RE: CF Dates with MX 6.1 ?

Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166646
---
huh?  Looks like Ian is using a DATE type, no need for to_date() then at
all.

WHERE startdate <= 
value="#startdate#" />

Of course, if using CACHEDWITHIN attribute, then you can't use the
cfqueryparam, then u have to use to_date()
WHERE startdate <=
TO_DATE('#DateFormat(startdate,'-mm-dd')#','-mm-dd')

You could also look at ALLTER SESSION in Oracel to set your default date
format and not need to_date at all.

Doug

-Original Message-
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 15, 2004 5:37 AM
To: CF-Talk
Subject: RE: CF Dates with MX 6.1 ?

Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166618
---
If you are using oracle, you should definitely use to_date to store
dates. It is probably using a US date format instead of a european.
Another solution is to pass everything as ISO dates -mm-dd. Most DBs
and apps understand it and you can't mess up months and days. 

WHERE startdate <= TO_DATE(
value="#Dateformat(startdate,'-mm-dd')#">,'-MM-DD')

Make sure dateformat returns it in the correct format. If you are using
eauropean dates, you may need to use LSDateFormat().

If startdate is in a specific format like dd/mm/ you can do:
WHERE startdate <= TO_DATE(
value="#startdate#">,'DD/MM/')

> -Original Message-
> From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 15 juni 2004 11:01
> To: CF-Talk
> Subject: CF Dates with MX 6.1 ?
> 
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166617
> ---
> Hi
>  
> Since upgrading to MX 6.1 the following date lines are not 
> working, the error returning is
>  
> 
> Error Executing Database Query. 
> 
> [Macromedia][Oracle JDBC Driver][Oracle]ORA-01843: not a valid month 
>  
> This is an example of two of the date lines I am using
>  
> 
> "dd/mm/")>
>  
> 
>  
> WHERE startdate <= #createodbcdate(formatted_date)#
>  
>  
> How do you solve this in CF6.1 by using CFQUERYPARAM ? or the 
> to_date function in Oracle ?
> 
> 
> 
  _ 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Dates with MX 6.1 ?

2004-06-15 Thread Pascal Peters
Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166651---I am no expert on that, but what date format would be allowed using
cf_sql_date? 

My experience is that, due to the different server configs we have in
Europe (and especially Belgium), using to_date was the only safe
alternative when moving an app around (dev, testing, staging, prod). I
usually have no control or access over the client db's (apart from
sending them the scripts to create the schema).

Pascal

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 15 juni 2004 15:15
> To: CF-Talk
> Subject: RE: CF Dates with MX 6.1 ?
> 
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166646
> ---
> huh?  Looks like Ian is using a DATE type, no need for 
> to_date() then at all.
>  
> WHERE startdate <= 
> value="#startdate#" />
>  
> Of course, if using CACHEDWITHIN attribute, then you can't 
> use the cfqueryparam, then u have to use to_date() WHERE 
> startdate <= 
> TO_DATE('#DateFormat(startdate,'-mm-dd')#','-mm-dd')
>  
> You could also look at ALLTER SESSION in Oracel to set your 
> default date format and not need to_date at all.
>  
> Doug
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Dates with MX 6.1 ?

2004-06-15 Thread Ian Vaughan
Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166648---Just these letting me down

 

"MM-DD-")>
   
"MM-DD-")>

 
I have tried

   
   

but am recieving 

Entity has incorrect type for being called as a function. 

The symbol you have provided startdate is not the name of a function. 	



From: Pascal Peters [mailto:[EMAIL PROTECTED] 
Sent: 15 June 2004 11:23
To: CF-Talk
Subject: RE: CF Dates with MX 6.1 ?

Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166621
---
> Pascal
>  
> This is the original code, and you are correct its in US Format
>  
> 
>  
> WHERE startdate <= #createodbcdate(formatted_date)#
>  
> So change it to 
>  
> WHERE STARTDATE <= TO_DATE(
> value="#formatted_date#">,'DD/MM/')
>  
> Is this correct ??? 

No, the mask has to match  the date format so:
WHERE STARTDATE <= TO_DATE(
value="#formatted_date#">,'MM/DD/')

> would I have to change the following line
>  
>  ???
> 

You don't have to, but you could do


WHERE STARTDATE <= TO_DATE(
value="#formatted_date#">,'-MM-DD')

You can pretty much do what you want as long as the mask in TO_DATE
matches the date format!

Pascal 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Dates with MX 6.1 ?

2004-06-15 Thread Douglas.Knudsen
Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166646---huh?  Looks like Ian is using a DATE type, no need for to_date() then at all.

 
WHERE startdate <= 

 
Of course, if using CACHEDWITHIN attribute, then you can't use the cfqueryparam, then u have to use to_date()
WHERE startdate <= TO_DATE('#DateFormat(startdate,'-mm-dd')#','-mm-dd')

 
You could also look at ALLTER SESSION in Oracel to set your default date format and not need to_date at all.

 
Doug

-Original Message-
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 15, 2004 5:37 AM
To: CF-Talk
Subject: RE: CF Dates with MX 6.1 ?

Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166618
---
If you are using oracle, you should definitely use to_date to store
dates. It is probably using a US date format instead of a european.
Another solution is to pass everything as ISO dates -mm-dd. Most DBs
and apps understand it and you can't mess up months and days. 

WHERE startdate <= TO_DATE(
value="#Dateformat(startdate,'-mm-dd')#">,'-MM-DD')

Make sure dateformat returns it in the correct format. If you are using
eauropean dates, you may need to use LSDateFormat().

If startdate is in a specific format like dd/mm/ you can do:
WHERE startdate <= TO_DATE(
value="#startdate#">,'DD/MM/')

> -Original Message-
> From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 15 juni 2004 11:01
> To: CF-Talk
> Subject: CF Dates with MX 6.1 ?
> 
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166617
> ---
> Hi
>  
> Since upgrading to MX 6.1 the following date lines are not 
> working, the error returning is
>  
> 
> Error Executing Database Query. 
> 
> [Macromedia][Oracle JDBC Driver][Oracle]ORA-01843: not a valid month 
>  
> This is an example of two of the date lines I am using
>  
> 
> "dd/mm/")>
>  
> 
>  
> WHERE startdate <= #createodbcdate(formatted_date)#
>  
>  
> How do you solve this in CF6.1 by using CFQUERYPARAM ? or the 
> to_date function in Oracle ?
> 
> 
> 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Dates with MX 6.1 ?

2004-06-15 Thread Pascal Peters
Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166621---> Pascal
>  
> This is the original code, and you are correct its in US Format
>  
> 
>  
> WHERE startdate <= #createodbcdate(formatted_date)#
>  
> So change it to 
>  
> WHERE STARTDATE <= TO_DATE(
> value="#formatted_date#">,'DD/MM/')
>  
> Is this correct ??? 

No, the mask has to match  the date format so:
WHERE STARTDATE <= TO_DATE(
value="#formatted_date#">,'MM/DD/')

> would I have to change the following line
>  
>  ???
> 

 
You don't have to, but you could do


WHERE STARTDATE <= TO_DATE(
value="#formatted_date#">,'-MM-DD')

You can pretty much do what you want as long as the mask in TO_DATE
matches the date format!

Pascal
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Dates with MX 6.1 ?

2004-06-15 Thread Ian Vaughan
Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166620---Pascal

 
This is the original code, and you are correct its in US Format

 


 
WHERE startdate <= #createodbcdate(formatted_date)#

 
So change it to 

 
WHERE STARTDATE <= TO_DATE(
value="#formatted_date#">,'DD/MM/')

 
Is this correct ??? would I have to change the following line

 
 ???





From: Pascal Peters [mailto:[EMAIL PROTECTED] 
Sent: 15 June 2004 10:37
To: CF-Talk
Subject: RE: CF Dates with MX 6.1 ?

Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166618
---
If you are using oracle, you should definitely use to_date to store
dates. It is probably using a US date format instead of a european.
Another solution is to pass everything as ISO dates -mm-dd. Most DBs
and apps understand it and you can't mess up months and days. 

WHERE startdate <= TO_DATE(
value="#Dateformat(startdate,'-mm-dd')#">,'-MM-DD')

Make sure dateformat returns it in the correct format. If you are using
eauropean dates, you may need to use LSDateFormat().

If startdate is in a specific format like dd/mm/ you can do:
WHERE startdate <= TO_DATE(
value="#startdate#">,'DD/MM/')

> -Original Message-
> From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 15 juni 2004 11:01
> To: CF-Talk
> Subject: CF Dates with MX 6.1 ?
> 
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166617
> ---
> Hi
>  
> Since upgrading to MX 6.1 the following date lines are not 
> working, the error returning is
>  
> 
> Error Executing Database Query. 
> 
> [Macromedia][Oracle JDBC Driver][Oracle]ORA-01843: not a valid month 
>  
> This is an example of two of the date lines I am using
>  
> 
> "dd/mm/")>
>  
> 
>  
> WHERE startdate <= #createodbcdate(formatted_date)#
>  
>  
> How do you solve this in CF6.1 by using CFQUERYPARAM ? or the 
> to_date function in Oracle ?
> 
> 
> 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Dates with MX 6.1 ?

2004-06-15 Thread Pascal Peters
Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166618---If you are using oracle, you should definitely use to_date to store
dates. It is probably using a US date format instead of a european.
Another solution is to pass everything as ISO dates -mm-dd. Most DBs
and apps understand it and you can't mess up months and days. 

WHERE startdate <= TO_DATE(
value="#Dateformat(startdate,'-mm-dd')#">,'-MM-DD')

Make sure dateformat returns it in the correct format. If you are using
eauropean dates, you may need to use LSDateFormat().

If startdate is in a specific format like dd/mm/ you can do:
WHERE startdate <= TO_DATE(
value="#startdate#">,'DD/MM/')

> -Original Message-
> From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 15 juni 2004 11:01
> To: CF-Talk
> Subject: CF Dates with MX 6.1 ?
> 
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166617
> ---
> Hi
>  
> Since upgrading to MX 6.1 the following date lines are not 
> working, the error returning is
>  
> 
> Error Executing Database Query. 
> 
> [Macromedia][Oracle JDBC Driver][Oracle]ORA-01843: not a valid month 	
>  
> This is an example of two of the date lines I am using
>  
> 
> "dd/mm/")>
>  
> 
>  
> WHERE startdate <= #createodbcdate(formatted_date)#
>  
>  
> How do you solve this in CF6.1 by using CFQUERYPARAM ? or the 
> to_date function in Oracle ?
> 
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]