Re: [cfaussie] Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
It's getting more mysterious too, Kym.   I have been concentrating on one
table - looking at the data in that table and the inserts into that table,
and being frustrated that all the tricks and traps I've learned over more
than a decade programming ColdFusion dont seem to be working.

Just clutching at straws, I looked at another table.  Perhaps, I thought, it
had something to do with the table I'm inserting into rather than the insert
statement.I have another table where the dates are being handled exactly
how I want them handled.   HUH!!??   So that implies this is nothing to do
with a system setting or the defaults of the database or the properties of
the login.  It's to do with the specific fields I'm using or the tables.

It could still be an error in the code but so far I've tried so many things,
  I find it hard to believe it might be there.

I continue to explore, and will report back if I solve this problem.   If i
dont solve this problem you might find me down at the Gap.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month



On Tue, Jun 8, 2010 at 3:50 PM, Kym Kovan dev-li...@mbcomms.net.au wrote:

 On 8/06/2010 15:16, Mike Kear wrote:

 @Dale,  I've just done a complete 180degree on that.   Yes i think it is
 coldfusion that's doing it.  I did a few more inserts and looked at the
 debugging.


 Then when i look at the variables in the insert statement,  when i use
 the CFQUERYPARAM type=cf_sql_date  its inserting {ts '2010-10-05
 00:00:00'}


 So you are saying that if you create a date object with create(Date)
 properly with defined year. month and day you are getting the wrong ts? oo,
 that's scary.





 --

 Yours,

 Kym Kovan
 mbcomms.net.au



-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread m...@ampersand.net.au




Actually what happens if you replace the cfquery tags
with cfoutput - just in case there is something odd going on before the
insert even happens.


On 8/06/2010 3:50 PM, Kym Kovan wrote:
On
8/06/2010 15:16, Mike Kear wrote:
  
  @Dale, I've just done a complete 180degree
on that. Yes i think it is

coldfusion that's doing it. I did a few more inserts and looked at the

debugging.



Then when i look at the variables in the insert statement, when i use

the CFQUERYPARAM type=cf_sql_date its inserting {ts '2010-10-05
00:00:00'}

  
  
So you are saying that if you create a date object with create(Date)
properly with defined year. month and day you are getting the wrong ts?
oo, that's scary.
  
  
  
  
  






-- 
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.




RE: [cfaussie] Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Steve Onnis
Mike
 
Have you tried using the sql server profiler to inspect the queries actually
being run? you can view the statement that the sql server is actually being
given. if its right there then its an sql server problem. If it isn't right
there then its a cf problem
 
Steve

  _  

From: Mike Kear [mailto:afpwebwo...@gmail.com] 
Sent: Tuesday, 8 June 2010 4:01 PM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Odd date behaviour - CF9/SQLServer2005


It's getting more mysterious too, Kym.   I have been concentrating on one
table - looking at the data in that table and the inserts into that table,
and being frustrated that all the tricks and traps I've learned over more
than a decade programming ColdFusion dont seem to be working.

Just clutching at straws, I looked at another table.  Perhaps, I thought, it
had something to do with the table I'm inserting into rather than the insert
statement.I have another table where the dates are being handled exactly
how I want them handled.   HUH!!??   So that implies this is nothing to do
with a system setting or the defaults of the database or the properties of
the login.  It's to do with the specific fields I'm using or the tables.  

It could still be an error in the code but so far I've tried so many things,
I find it hard to believe it might be there.

I continue to explore, and will report back if I solve this problem.   If i
dont solve this problem you might find me down at the Gap.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month



On Tue, Jun 8, 2010 at 3:50 PM, Kym Kovan dev-li...@mbcomms.net.au wrote:


On 8/06/2010 15:16, Mike Kear wrote:


@Dale,  I've just done a complete 180degree on that.   Yes i think it is
coldfusion that's doing it.  I did a few more inserts and looked at the
debugging.



Then when i look at the variables in the insert statement,  when i use
the CFQUERYPARAM type=cf_sql_date  its inserting {ts '2010-10-05 00:00:00'}



So you are saying that if you create a date object with create(Date)
properly with defined year. month and day you are getting the wrong ts? oo,
that's scary. 





-- 

Yours,

Kym Kovan
mbcomms.net.au




-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Scott Thornton
IMO, Set Langauge seems a bit... obtuse?

SET LANGUAGE DMY seems more appropriate, especially if you are giong to enter 
it into every sproc.

cheers,

 Mike Kear afpwebwo...@gmail.com 08/06/2010 2:27 pm 
Thanks everyone for your help with this. I  dont have it solved yet but i'm
on the right track now I think.

I dont have this problem with any of the code I've written from scratch, but
in this case I'm inheriting a lot of code written in CF5 years ago, and
moved to a new server and database server.

I have determined by manually altering the values in the date fields that if
the dates are stored in -mm-dd format in the database, all the legacy
code works as expected, so all I have to do is make sure any insert and
update statements force the dates always to be inserted the right way
around.

It seems that if i add a Set language = 'british'  to my insert and update
queries, that should make sure of that. That's my theory and I'm testing
it now.

Once this episode is all done, I'll write more about how i manage Australian
format  dates when i write my own code, because I've had that under control
for a long time.  I only see this problem because of all the legacy code
I've inherited.

@Gavin,  no need for the meaculpa.  I had travelled along the locale road in
the documentation for SQLServer and had found SET LANGUAGE in my travels.
So you led me to this path anyway.

Thanks


Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com 
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month



On Tue, Jun 8, 2010 at 2:15 PM, Gavin Baumanis beauecli...@gmail.comwrote:

 Hi All,

 On Jun 8, 2:06 pm, Scott Thornton
 scott.thorn...@hnehealth.nsw.gov.au wrote:
  Hi,
 
  pretty sure that collation refers to sort order.
 
  Language refers to date format however, but I could not find a server
 wide setting to change it.
 
  SELECT @@LANGUAGE AS 'Language Name' returns us_english in my SQL 2005
 server. If the language was British it would default to dmy
 
  select * from master.dbo.syslanguages to check out the dateformats
 available.
 
  I gave up on CF and SQL working well with European\Aussie dates long ago.
 
  I like using SET DATEFORMAT DMY in all of my procedures, and within CF
 DateFormat( x, dd-MMM-) but I agree that we should not have to.
 

 Ahhh thats the one - thanks Scott!
 Looks loie we do the same thing... manually ensure that the dateformat
 is manually handled prior to insertion into the database - regardless
 of format chosen.

 Sorry for the misleading LOCALE setting Mike!

 Gavin.



-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



[cfaussie] coldfusionmeetup.com

2010-06-08 Thread Andrew Myers

Hi,

I only discovered this site yesterday, and it's fantastic, especially the  
recordings of past sessions.  Great work Charlie.


I watched Dan Wilson's recording on Model Glue last night, and he appeared  
to use some really funky shortcuts in CFBuilder to generate stuff like  
cfcomponent ... and cfargument ... tags.  Does anyone know how it's  
done?  Is it native to CFBuilder or did he setup some personalised  
templates?


Andrew.

--
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Mark Mandel
I'm guessing he used snippets?

That is native to Builder and CFEclipse.

Mark

On Wed, Jun 9, 2010 at 9:43 AM, Andrew Myers am2...@gmail.com wrote:

 Hi,

 I only discovered this site yesterday, and it's fantastic, especially the
 recordings of past sessions.  Great work Charlie.

 I watched Dan Wilson's recording on Model Glue last night, and he appeared
 to use some really funky shortcuts in CFBuilder to generate stuff like
 cfcomponent ... and cfargument ... tags.  Does anyone know how it's
 done?  Is it native to CFBuilder or did he setup some personalised
 templates?

 Andrew.

 --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaus...@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.comcfaussie%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.




-- 
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australia
http://www.cfobjective.com.au

Hands-on ColdFusion ORM Training
www.ColdFusionOrmTraining.com

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Andrew Myers
Cheers Mark.  But you have to configure them yourself I guess - they don't  
come pre-built with Builder?


If I go to Window - Preferences - ColdFusion - Snippets  it has a  
snippet path which is set to:


C:\Users\andrew\Adobe ColdFusion Builder workspace\.metadata\snippets

But that folder is empty.

It would be very nice if someone had some they wanted to share.  :-)

On Wed, 09 Jun 2010 09:47:03 +1000, Mark Mandel mark.man...@gmail.com  
wrote:



I'm guessing he used snippets?

That is native to Builder and CFEclipse.

Mark



--
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Mark Mandel
Yep, you have to build them yourself.  There are none that come pre-packaged
by default.

Snippets work the same between CFEclipse and Builder, so if you can find a
set for CFEclipse, you can use them in Builder.

There is lots of stuff out there on snippets:
http://www.google.com.au/search?q=CFEClipse+snippetsie=utf-8oe=utf-8aq=trls=com.ubuntu:en-US:officialclient=firefox-a
http://www.google.com.au/search?q=ColdFusion+Builder+snippetsie=utf-8oe=utf-8aq=trls=com.ubuntu:en-US:officialclient=firefox-a

Mark

On Wed, Jun 9, 2010 at 9:59 AM, Andrew Myers am2...@gmail.com wrote:

 Cheers Mark.  But you have to configure them yourself I guess - they don't
 come pre-built with Builder?

 If I go to Window - Preferences - ColdFusion - Snippets  it has a
 snippet path which is set to:

 C:\Users\andrew\Adobe ColdFusion Builder workspace\.metadata\snippets

 But that folder is empty.

 It would be very nice if someone had some they wanted to share.  :-)


 On Wed, 09 Jun 2010 09:47:03 +1000, Mark Mandel mark.man...@gmail.com
 wrote:

  I'm guessing he used snippets?

 That is native to Builder and CFEclipse.

 Mark


 --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaus...@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.comcfaussie%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.




-- 
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australia
http://www.cfobjective.com.au

Hands-on ColdFusion ORM Training
www.ColdFusionOrmTraining.com

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Andrew Myers

Perfect Mark.  Thank you kindly.

On Wed, 09 Jun 2010 10:04:19 +1000, Mark Mandel mark.man...@gmail.com  
wrote:


Yep, you have to build them yourself.  There are none that come  
pre-packaged

by default.

Snippets work the same between CFEclipse and Builder, so if you can find  
a

set for CFEclipse, you can use them in Builder.

There is lots of stuff out there on snippets:
http://www.google.com.au/search?q=CFEClipse+snippetsie=utf-8oe=utf-8aq=trls=com.ubuntu:en-US:officialclient=firefox-a
http://www.google.com.au/search?q=ColdFusion+Builder+snippetsie=utf-8oe=utf-8aq=trls=com.ubuntu:en-US:officialclient=firefox-a

Mark

On Wed, Jun 9, 2010 at 9:59 AM, Andrew Myers am2...@gmail.com wrote:

Cheers Mark.  But you have to configure them yourself I guess - they  
don't

come pre-built with Builder?

If I go to Window - Preferences - ColdFusion - Snippets  it has a
snippet path which is set to:

C:\Users\andrew\Adobe ColdFusion Builder workspace\.metadata\snippets

But that folder is empty.

It would be very nice if someone had some they wanted to share.  :-)


On Wed, 09 Jun 2010 09:47:03 +1000, Mark Mandel mark.man...@gmail.com
wrote:

 I'm guessing he used snippets?


That is native to Builder and CFEclipse.

Mark



--
You received this message because you are subscribed to the Google  
Groups

cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.comcfaussie%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.






--
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
Believe it or not, I'm still worrying away at this date issue.I dont
understand ColdFusion's insistence that we have to use American dates.
(This is CF9 Enterprise by the way)

I create a date object,  using the following:

createdate(2010,10,06)   which is supposed to be year, month, day in
that order.Then when i output the date in the next line it shows that
date as 06/Oct/2010

It doesn't seem to make any difference whether i set a locale or not.
It's nothing to do with dateformat,  the problem here is that I'm creating a
date using year-month-day and it's understanding it as year-day-month.
 HUH??

Here is the actual code:
cfset testdate = createdate(2010,10,06) /
cfoutput
ptest date is  #testdate# : #dateformat(testdate, dd/mmm/)# /p
/cfoutput

The result i get is this:
test date is {ts '2010-10-06 00:00:00'} : 06/Oct/2010

Can someone else please run this code on their CF9 and see if they get the
same result?   That way i can know if this is being caused by something in
the environment here.


Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month





On Tue, Jun 8, 2010 at 4:44 PM, Scott Thornton 
scott.thorn...@hnehealth.nsw.gov.au wrote:

 IMO, Set Langauge seems a bit... obtuse?

 SET LANGUAGE DMY seems more appropriate, especially if you are giong to
 enter it into every sproc.

 cheers,



-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
Oh jeezz.   Ever had those moments when you wish you'd just taken a breath
first???

Forget that.If i do it properly without the code error, i get the right
result.

hides his head in shame!@

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month



On Wed, Jun 9, 2010 at 10:29 AM, Mike Kear afpwebwo...@gmail.com wrote:

 Believe it or not, I'm still worrying away at this date issue.I dont
 understand ColdFusion's insistence that we have to use American dates.
 (This is CF9 Enterprise by the way)

 I create a date object,  using the following:

 createdate(2010,10,06)   which is supposed to be year, month, day in
 that order.Then when i output the date in the next line it shows that
 date as 06/Oct/2010

 It doesn't seem to make any difference whether i set a locale or not.
 It's nothing to do with dateformat,  the problem here is that I'm creating a
 date using year-month-day and it's understanding it as year-day-month.
  HUH??

 Here is the actual code:
 cfset testdate = createdate(2010,10,06) /
 cfoutput
 ptest date is  #testdate# : #dateformat(testdate, dd/mmm/)# /p
 /cfoutput

 The result i get is this:
 test date is {ts '2010-10-06 00:00:00'} : 06/Oct/2010

 Can someone else please run this code on their CF9 and see if they get the
 same result?   That way i can know if this is being caused by something in
 the environment here.


 Cheers
 Mike Kear
 Windsor, NSW, Australia
 Adobe Certified Advanced ColdFusion Developer
 AFP Webworks
 http://afpwebworks.com
 ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month





 On Tue, Jun 8, 2010 at 4:44 PM, Scott Thornton 
 scott.thorn...@hnehealth.nsw.gov.au wrote:

 IMO, Set Langauge seems a bit... obtuse?

 SET LANGUAGE DMY seems more appropriate, especially if you are giong to
 enter it into every sproc.

 cheers,




--

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Dale Fraser
Its working

 

createDate(year, month, day)

 

2010,10,06 is 6th of October.

 

Regards

Dale Fraser

 

http://dale.fraser.id.au

http://cfmldocs.com http://cfmldocs.com/ 

http://learncf.com

http://flexcf.com

 

From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf
Of Mike Kear
Sent: Wednesday, 9 June 2010 10:30 AM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

 

Believe it or not, I'm still worrying away at this date issue.I dont
understand ColdFusion's insistence that we have to use American dates.
(This is CF9 Enterprise by the way)

 

I create a date object,  using the following: 

 

createdate(2010,10,06)   which is supposed to be year, month, day in
that order.Then when i output the date in the next line it shows that
date as 06/Oct/2010

 

It doesn't seem to make any difference whether i set a locale or not.
It's nothing to do with dateformat,  the problem here is that I'm creating a
date using year-month-day and it's understanding it as year-day-month.
HUH??

 

Here is the actual code: 

cfset testdate = createdate(2010,10,06) /

cfoutput

ptest date is  #testdate# : #dateformat(testdate, dd/mmm/)# /p

/cfoutput

 

The result i get is this: 

test date is {ts '2010-10-06 00:00:00'} : 06/Oct/2010

 

Can someone else please run this code on their CF9 and see if they get the
same result?   That way i can know if this is being caused by something in
the environment here.

 

 

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

 

 

 

 

On Tue, Jun 8, 2010 at 4:44 PM, Scott Thornton
scott.thorn...@hnehealth.nsw.gov.au wrote:

IMO, Set Langauge seems a bit... obtuse?

SET LANGUAGE DMY seems more appropriate, especially if you are giong to
enter it into every sproc.

cheers,

-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



[cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Gavin Baumanis
Hi Mike,

On Jun 9, 10:29 am, Mike Kear afpwebwo...@gmail.com wrote:
 Believe it or not, I'm still worrying away at this date issue.    I dont
 understand ColdFusion's insistence that we have to use American dates.
 (This is CF9 Enterprise by the way)

 I create a date object,  using the following:

 createdate(2010,10,06)   which is supposed to be year, month, day in
 that order.    Then when i output the date in the next line it shows that
 date as 06/Oct/2010


2010-10-06 IS the same as 06/OCT/2010 - or is there something else I
am missing in your message?

Gavin

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



[cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Gavin Baumanis
@Dale et al,
Probably should have read all the emails prior to replying I guess!!!
Though at least I get some assurace that I am not going crazy!
And that for at least this email thread I can read properly!

@Mike,
Does that mean your happy with your code now?


Gavin

On Jun 9, 10:33 am, Dale Fraser d...@fraser.id.au wrote:
 Its working

 createDate(year, month, day)

 2010,10,06 is 6th of October.

 Regards

 Dale Fraser

 http://dale.fraser.id.au

 http://cfmldocs.comhttp://cfmldocs.com/

 http://learncf.com

 http://flexcf.com

 From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf
 Of Mike Kear
 Sent: Wednesday, 9 June 2010 10:30 AM
 To: cfaussie@googlegroups.com
 Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

 Believe it or not, I'm still worrying away at this date issue.    I dont
 understand ColdFusion's insistence that we have to use American dates.
 (This is CF9 Enterprise by the way)

 I create a date object,  using the following:

 createdate(2010,10,06)   which is supposed to be year, month, day in
 that order.    Then when i output the date in the next line it shows that
 date as 06/Oct/2010

 It doesn't seem to make any difference whether i set a locale or not.
 It's nothing to do with dateformat,  the problem here is that I'm creating a
 date using year-month-day and it's understanding it as year-day-month.
 HUH??

 Here is the actual code:

 cfset testdate = createdate(2010,10,06) /

 cfoutput

 ptest date is  #testdate# : #dateformat(testdate, dd/mmm/)# /p

 /cfoutput

 The result i get is this:

 test date is {ts '2010-10-06 00:00:00'} : 06/Oct/2010

 Can someone else please run this code on their CF9 and see if they get the
 same result?   That way i can know if this is being caused by something in
 the environment here.

 Cheers
 Mike Kear
 Windsor, NSW, Australia
 Adobe Certified Advanced ColdFusion Developer
 AFP Webworkshttp://afpwebworks.com
 ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

 On Tue, Jun 8, 2010 at 4:44 PM, Scott Thornton

 scott.thorn...@hnehealth.nsw.gov.au wrote:

 IMO, Set Langauge seems a bit... obtuse?

 SET LANGUAGE DMY seems more appropriate, especially if you are giong to
 enter it into every sproc.

 cheers,

 --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaus...@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Steve Onnis
But thats correct isnt it? October is the 10th month

  _  

From: Mike Kear [mailto:afpwebwo...@gmail.com] 
Sent: Wednesday, 9 June 2010 10:30 AM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005


Believe it or not, I'm still worrying away at this date issue.I dont
understand ColdFusion's insistence that we have to use American dates.
(This is CF9 Enterprise by the way) 

I create a date object,  using the following: 

createdate(2010,10,06)   which is supposed to be year, month, day in
that order.Then when i output the date in the next line it shows that
date as 06/Oct/2010

It doesn't seem to make any difference whether i set a locale or not.
It's nothing to do with dateformat,  the problem here is that I'm creating a
date using year-month-day and it's understanding it as year-day-month.
HUH??

Here is the actual code: 
cfset testdate = createdate(2010,10,06) /
cfoutput
ptest date is  #testdate# : #dateformat(testdate, dd/mmm/)# /p
/cfoutput

The result i get is this: 
test date is {ts '2010-10-06 00:00:00'} : 06/Oct/2010

Can someone else please run this code on their CF9 and see if they get the
same result?   That way i can know if this is being caused by something in
the environment here.


Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month





On Tue, Jun 8, 2010 at 4:44 PM, Scott Thornton
scott.thorn...@hnehealth.nsw.gov.au wrote:


IMO, Set Langauge seems a bit... obtuse?

SET LANGUAGE DMY seems more appropriate, especially if you are giong to
enter it into every sproc.

cheers,



-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Steve Onnis
The annoying this though is that you cant seem to be able to assign
shortcuts to your snippets like you can in HomeSite.

  _  

From: Mark Mandel [mailto:mark.man...@gmail.com] 
Sent: Wednesday, 9 June 2010 10:04 AM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] coldfusionmeetup.com


Yep, you have to build them yourself.  There are none that come pre-packaged
by default.

Snippets work the same between CFEclipse and Builder, so if you can find a
set for CFEclipse, you can use them in Builder.

There is lots of stuff out there on snippets:
http://www.google.com.au/search?q=CFEClipse+snippets
http://www.google.com.au/search?q=CFEClipse+snippetsie=utf-8oe=utf-8aq=t
rls=com.ubuntu:en-US:officialclient=firefox-a
ie=utf-8oe=utf-8aq=trls=com.ubuntu:en-US:officialclient=firefox-a
http://www.google.com.au/search?q=ColdFusion+Builder+snippets
http://www.google.com.au/search?q=ColdFusion+Builder+snippetsie=utf-8oe=u
tf-8aq=trls=com.ubuntu:en-US:officialclient=firefox-a
ie=utf-8oe=utf-8aq=trls=com.ubuntu:en-US:officialclient=firefox-a

Mark


On Wed, Jun 9, 2010 at 9:59 AM, Andrew Myers am2...@gmail.com wrote:


Cheers Mark.  But you have to configure them yourself I guess - they don't
come pre-built with Builder?

If I go to Window - Preferences - ColdFusion - Snippets  it has a snippet
path which is set to:

C:\Users\andrew\Adobe ColdFusion Builder workspace\.metadata\snippets

But that folder is empty.

It would be very nice if someone had some they wanted to share.  :-) 


On Wed, 09 Jun 2010 09:47:03 +1000, Mark Mandel mark.man...@gmail.com
wrote:



I'm guessing he used snippets?

That is native to Builder and CFEclipse.

Mark




-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com
mailto:cfaussie%2bunsubscr...@googlegroups.com .
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.






-- 
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australia
http://www.cfobjective.com.au

Hands-on ColdFusion ORM Training
www.ColdFusionOrmTraining.com


-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread m...@ampersand.net.au




His problem was that when he takes that date and
inserts it into SQL it goes in as 2010-06-10, but if the month was past
the 12th then it goes in incorrectly, i.e. if he does 2010-12-30 he
gets December 30 (correct), if he goes 2010-04-07 he gets July 4
(wrong).

Personally, I still reckon it's SQL Server doing something odd. Can you
try another SQL login/username and see what happens then? or do you
only have one login?


On 9/06/2010 11:00 AM, Steve Onnis wrote:

  
  
  But thats correct isnt it?
October is the 10th month
  
  
  From: Mike Kear
[mailto:afpwebwo...@gmail.com] 
  Sent: Wednesday, 9 June 2010 10:30 AM
  To: cfaussie@googlegroups.com
  Subject: Re: [cfaussie] Re: Odd date behaviour -
CF9/SQLServer2005
  
  
Believe it or not, I'm still worrying away at this date issue.  I
dont understand ColdFusion's insistence that we have to use American
dates.  (This is CF9 Enterprise by the way)
  
  
  I create a date object, using the following:
  
  
  createdate("2010","10","06")  which is supposed to be year,
month, day in that order.  Then when i output the date in the next
line it shows that date as06/Oct/2010
  
  
  It doesn't seem to make any difference whether i set a locale or
not.   It's nothing to do with dateformat, the problem here is that
I'm creating a date using year-month-day and it's understanding it as
year-day-month.  HUH??
  
  
  Here is the actual code:
  cfsettestdate = createdate("2010","10","06") /
  cfoutput
  ptest date is #testdate# : #dateformat(testdate,
"dd/mmm/")# /p
  /cfoutput
  
  
  The result i get is this:
  test
date is {ts '2010-10-06 00:00:00'} : 06/Oct/2010
  
  
  Can someone else please run this code on their CF9 and see if
they get the same result?  That way i can know if this is being caused
by something in the environment here.
  
  
  
  
  Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
  http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month
  
  
  
  
  
  
  
  
  On Tue, Jun 8, 2010 at 4:44 PM, Scott
Thornton scott.thorn...@hnehealth.nsw.gov.au
wrote:
  IMO,
Set Langauge seems a bit... obtuse?

SET LANGUAGE DMY seems more appropriate, especially if you are giong to
enter it into every sproc.

cheers,

  
  
  
-- 
You received this message because you are subscribed to the Google
Groups "cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.
-- 
You received this message because you are subscribed to the Google
Groups "cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.






-- 
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.




[cfaussie] Re: coldfusionmeetup.com

2010-06-08 Thread Gavin Baumanis
Hi Steve,

On Jun 9, 11:02 am, Steve Onnis st...@cfcentral.com.au wrote:
 The annoying this though is that you cant seem to be able to assign
 shortcuts to your snippets like you can in HomeSite.


During the beta cycle for CFBuilder I raised an E?R for allowing
custom key bindings.
From memory I think it got placed on the back-burner.

To my mind, custom key bindings is a pre-requisite for an IDE - Adobe
saw it otherwise, at the time.

Gavin.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
Well i had to suck that back again and wished i could have completely
obliterated my previous email.   I had a mistake in the code i posted on my
example earlier.But i have just found the exact scenario happening.

Inside my CFCs,  i think American dates are always assumed.   I am setting a
date in my bean.   Even if i specifically set it using the code i quoted in
my last email  ( i.e. PosBean.setTransDate( createdate(2010,06,10) )
 for 10th June)   if i immediately output the date I get a different result
to what i get if i have it in a regular .cfm file.

cfdump var=#lsdateformat(posbean.getTransDate(), 'dd/mmm/')# /
cfdump var=#dateformat(posbean.getTransDate(), 'dd/mmm/')#  /

This code in a .cfm file outputs two showing 10 June.   If i output from a
.cfc it shows the first as 10 June, and the second as 6 October.

So unless i'm mistaken, I get a different result in a .cfm page than i get
if i output from a cfc.  The trouble is, it's the .cfc that is causing the
problem because its the cfc that creates the insert statement to the
database.

 This is proving to be a particularly elusive problem.  But since we use
dates to select records for a whole host of reports,  it's essential that i
sort it out.


Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month



On Wed, Jun 9, 2010 at 10:33 AM, Dale Fraser d...@fraser.id.au wrote:

  Its working



 createDate(year, month, day)



 2010,10,06 is 6th of October.



 Regards

 Dale Fraser



 http://dale.fraser.id.au

 http://cfmldocs.com

 http://learncf.com

 http://flexcf.com



 *From:* cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] *On
 Behalf Of *Mike Kear
 *Sent:* Wednesday, 9 June 2010 10:30 AM
 *To:* cfaussie@googlegroups.com
 *Subject:* Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005



 Believe it or not, I'm still worrying away at this date issue.I dont
 understand ColdFusion's insistence that we have to use American dates.
 (This is CF9 Enterprise by the way)



 I create a date object,  using the following:



 createdate(2010,10,06)   which is supposed to be year, month, day in
 that order.Then when i output the date in the next line it shows that
 date as 06/Oct/2010



 It doesn't seem to make any difference whether i set a locale or not.
 It's nothing to do with dateformat,  the problem here is that I'm creating a
 date using year-month-day and it's understanding it as year-day-month.
  HUH??



 Here is the actual code:

 cfset testdate = createdate(2010,10,06) /

 cfoutput

 ptest date is  #testdate# : #dateformat(testdate, dd/mmm/)# /p

 /cfoutput



 The result i get is this:

 *test date is {ts '2010-10-06 00:00:00'} : 06/Oct/2010*



 Can someone else please run this code on their CF9 and see if they get the
 same result?   That way i can know if this is being caused by something in
 the environment here.





 Cheers
 Mike Kear
 Windsor, NSW, Australia
 Adobe Certified Advanced ColdFusion Developer
 AFP Webworks
 http://afpwebworks.com
 ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month









 On Tue, Jun 8, 2010 at 4:44 PM, Scott Thornton 
 scott.thorn...@hnehealth.nsw.gov.au wrote:

 IMO, Set Langauge seems a bit... obtuse?

 SET LANGUAGE DMY seems more appropriate, especially if you are giong to
 enter it into every sproc.

 cheers,

 --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaus...@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.comcfaussie%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.

   --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaus...@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.comcfaussie%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.




-- 
Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: coldfusionmeetup.com

2010-06-08 Thread Mark Mandel
From memory the snippet shortcuts were a bit more powerful than shortcuts,
as you could tell them to do things multiple times

So doing something like:

gs*2

would run that snippet twice over.

Not sure if that made it into Builder though. It did work on CFEclipse.

Mark

On Wed, Jun 9, 2010 at 11:09 AM, Gavin Baumanis beauecli...@gmail.comwrote:

 Hi Steve,

 On Jun 9, 11:02 am, Steve Onnis st...@cfcentral.com.au wrote:
  The annoying this though is that you cant seem to be able to assign
  shortcuts to your snippets like you can in HomeSite.
 

 During the beta cycle for CFBuilder I raised an E?R for allowing
 custom key bindings.
 From memory I think it got placed on the back-burner.

 To my mind, custom key bindings is a pre-requisite for an IDE - Adobe
 saw it otherwise, at the time.

 Gavin.

 --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaus...@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.comcfaussie%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.




-- 
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australia
http://www.cfobjective.com.au

Hands-on ColdFusion ORM Training
www.ColdFusionOrmTraining.com

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: coldfusionmeetup.com

2010-06-08 Thread Sean Corfield
On Tue, Jun 8, 2010 at 6:16 PM, Mark Mandel mark.man...@gmail.com wrote:
 From memory the snippet shortcuts were a bit more powerful than shortcuts,
 as you could tell them to do things multiple times

 So doing something like:

 gs*2

 would run that snippet twice over.

 Not sure if that made it into Builder though. It did work on CFEclipse.

It does not work on CFBuilder.

The cool thing about snippets is that you can have variable
substitutions in them which pops up a dialog with form fields -
including drop-downs and default values - so you can type a few
characters, hit ctl-j, fill out a few form fields and have complete
functions or whatever appear in the editor for you.

As for custom key bindings, Eclipse is a bit of a pain in that area
and whilst you can configure a key binding for any 'action' in
Eclipse, the snippet insertion is a generic action - regardless of the
content of the snippet - and therefore can only have one key bound to
it (as I understand it).
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Steve Onnis
do you have a return type set on the function of the cfc ?

  _  

From: Mike Kear [mailto:afpwebwo...@gmail.com] 
Sent: Wednesday, 9 June 2010 11:13 AM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005


Well i had to suck that back again and wished i could have completely
obliterated my previous email.   I had a mistake in the code i posted on my
example earlier.But i have just found the exact scenario happening.  

Inside my CFCs,  i think American dates are always assumed.   I am setting a
date in my bean.   Even if i specifically set it using the code i quoted in
my last email  ( i.e. PosBean.setTransDate( createdate(2010,06,10) )
for 10th June)   if i immediately output the date I get a different result
to what i get if i have it in a regular .cfm file. 

cfdump var=#lsdateformat(posbean.getTransDate(), 'dd/mmm/')# / 
cfdump var=#dateformat(posbean.getTransDate(), 'dd/mmm/')#  /

This code in a .cfm file outputs two showing 10 June.   If i output from a
.cfc it shows the first as 10 June, and the second as 6 October.

So unless i'm mistaken, I get a different result in a .cfm page than i get
if i output from a cfc.  The trouble is, it's the .cfc that is causing the
problem because its the cfc that creates the insert statement to the
database.

 This is proving to be a particularly elusive problem.  But since we use
dates to select records for a whole host of reports,  it's essential that i
sort it out.


Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month


 

On Wed, Jun 9, 2010 at 10:33 AM, Dale Fraser d...@fraser.id.au wrote:


Its working

 

createDate(year, month, day)

 

2010,10,06 is 6th of October.

 

Regards

Dale Fraser

 

http://dale.fraser.id.au

http://cfmldocs.com http://cfmldocs.com/ 

http://learncf.com

http://flexcf.com

 

From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf
Of Mike Kear
Sent: Wednesday, 9 June 2010 10:30 AM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

 

Believe it or not, I'm still worrying away at this date issue.I dont
understand ColdFusion's insistence that we have to use American dates.
(This is CF9 Enterprise by the way)

 

I create a date object,  using the following: 

 

createdate(2010,10,06)   which is supposed to be year, month, day in
that order.Then when i output the date in the next line it shows that
date as 06/Oct/2010

 

It doesn't seem to make any difference whether i set a locale or not.
It's nothing to do with dateformat,  the problem here is that I'm creating a
date using year-month-day and it's understanding it as year-day-month.
HUH??

 

Here is the actual code: 

cfset testdate = createdate(2010,10,06) /

cfoutput

ptest date is  #testdate# : #dateformat(testdate, dd/mmm/)# /p

/cfoutput

 

The result i get is this: 

test date is {ts '2010-10-06 00:00:00'} : 06/Oct/2010

 

Can someone else please run this code on their CF9 and see if they get the
same result?   That way i can know if this is being caused by something in
the environment here.

 

 

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

 

 

 

 

On Tue, Jun 8, 2010 at 4:44 PM, Scott Thornton
scott.thorn...@hnehealth.nsw.gov.au wrote:

IMO, Set Langauge seems a bit... obtuse?

SET LANGUAGE DMY seems more appropriate, especially if you are giong to
enter it into every sproc.

cheers,

-- 


You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com
mailto:cfaussie%2bunsubscr...@googlegroups.com .
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.





-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com
mailto:cfaussie%2bunsubscr...@googlegroups.com .
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.





-- 
Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month


-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at

[cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Gavin Baumanis
Hi Mike I am NOT seeing your issue.

Here is the code I am using;
(I even changed the format slightly between the CFC and the CFM just
to ensure it was dumping correctly.)

dateformatter.cfm
I am in the CFMbr /
hr /
cfset thedate = createdate(2010,06,10) 

cfdump var=#lsdateformat(thedate, 'dd/mmm/')# /br /
cfdump var=#dateformat(thedate, 'dd/mmm/')#  / br /
hr /

cfset myobj = createobject(component,/scribble/dateformatter)
I am in the CFCbr /
cfscript
myobj.fn_datedumper();
/cfscript



dateformatter.cfc
cfcomponent output=false
cffunction name=fn_datedumper
cfset thedate = createdate(2010,06,10) 

cfdump var=#lsdateformat(thedate, 'dd/mm/')# /br /
cfdump var=#dateformat(thedate, 'dd/mm/')#  / br /
/cffunction
/cfcomponent

and here is the output;

I am in the CFM
10/Jun/2010
10/Jun/2010
I am in the CFC
10/06/2010
10/06/2010


As a best guess - I would be looking at the code used to insert /
update date columns in the database.
As I said previously in this thread, we dateformat(thedate, -mm-
dd) in all hand written SQL that inserts/updates to ensure it is
persisted correctly.
it was the ONLY way e could find to ensure valid dates everytime - and
we spent a substantial amunt of time on trying to work it out, prior
to going down that path.
There may well be an easier option - and we ust donlt know about
it... but at least we can (now) guarantee that all dates are correct
in our database.

Gavin.

On Jun 9, 11:13 am, Mike Kear afpwebwo...@gmail.com wrote:
 Well i had to suck that back again and wished i could have completely
 obliterated my previous email.   I had a mistake in the code i posted on my
 example earlier.    But i have just found the exact scenario happening.

 Inside my CFCs,  i think American dates are always assumed.   I am setting a
 date in my bean.   Even if i specifically set it using the code i quoted in
 my last email  ( i.e. PosBean.setTransDate( createdate(2010,06,10) )
  for 10th June)   if i immediately output the date I get a different result
 to what i get if i have it in a regular .cfm file.

 cfdump var=#lsdateformat(posbean.getTransDate(), 'dd/mmm/')# /
 cfdump var=#dateformat(posbean.getTransDate(), 'dd/mmm/')#  /

 This code in a .cfm file outputs two showing 10 June.   If i output from a
 .cfc it shows the first as 10 June, and the second as 6 October.

 So unless i'm mistaken, I get a different result in a .cfm page than i get
 if i output from a cfc.  The trouble is, it's the .cfc that is causing the
 problem because its the cfc that creates the insert statement to the
 database.

  This is proving to be a particularly elusive problem.  But since we use
 dates to select records for a whole host of reports,  it's essential that i
 sort it out.

 Cheers
 Mike Kear
 Windsor, NSW, Australia
 Adobe Certified Advanced ColdFusion Developer
 AFP Webworkshttp://afpwebworks.com
 ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month



 On Wed, Jun 9, 2010 at 10:33 AM, Dale Fraser d...@fraser.id.au wrote:
   Its working

  createDate(year, month, day)

  2010,10,06 is 6th of October.

  Regards

  Dale Fraser

 http://dale.fraser.id.au

 http://cfmldocs.com

 http://learncf.com

 http://flexcf.com

  *From:* cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] *On
  Behalf Of *Mike Kear
  *Sent:* Wednesday, 9 June 2010 10:30 AM
  *To:* cfaussie@googlegroups.com
  *Subject:* Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

  Believe it or not, I'm still worrying away at this date issue.    I dont
  understand ColdFusion's insistence that we have to use American dates.
  (This is CF9 Enterprise by the way)

  I create a date object,  using the following:

  createdate(2010,10,06)   which is supposed to be year, month, day in
  that order.    Then when i output the date in the next line it shows that
  date as 06/Oct/2010

  It doesn't seem to make any difference whether i set a locale or not.
  It's nothing to do with dateformat,  the problem here is that I'm creating a
  date using year-month-day and it's understanding it as year-day-month.
   HUH??

  Here is the actual code:

  cfset testdate = createdate(2010,10,06) /

  cfoutput

  ptest date is  #testdate# : #dateformat(testdate, dd/mmm/)# /p

  /cfoutput

  The result i get is this:

  *test date is {ts '2010-10-06 00:00:00'} : 06/Oct/2010*

  Can someone else please run this code on their CF9 and see if they get the
  same result?   That way i can know if this is being caused by something in
  the environment here.

  Cheers
  Mike Kear
  Windsor, NSW, Australia
  Adobe Certified Advanced ColdFusion Developer
  AFP Webworks
 http://afpwebworks.com
  ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

  On Tue, Jun 8, 2010 at 4:44 PM, Scott Thornton 
  scott.thorn...@hnehealth.nsw.gov.au wrote:

  IMO, Set Langauge seems a bit... obtuse?

  SET LANGUAGE DMY seems more 

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread m...@ampersand.net.au




Is the code in the CFC doing anything obviously wrong
(like formatting the date)?


On 9/06/2010 11:38 AM, Gavin Baumanis wrote:

  Hi Mike I am NOT seeing your issue.

Here is the code I am using;
(I even changed the format slightly between the CFC and the CFM just
to ensure it was dumping correctly.)

dateformatter.cfm
I am in the CFMbr /
hr /
cfset thedate = createdate("2010","06","10") 

cfdump var="#lsdateformat(thedate, 'dd/mmm/')#" /br /
cfdump var="#dateformat(thedate, 'dd/mmm/')#"  / br /
hr /

cfset myobj = createobject("component","/scribble/dateformatter")
I am in the CFCbr /
cfscript
	myobj.fn_datedumper();
/cfscript



dateformatter.cfc
cfcomponent output="false"
	cffunction name="fn_datedumper"
		cfset thedate = createdate("2010","06","10") 

		cfdump var="#lsdateformat(thedate, 'dd/mm/')#" /br /
		cfdump var="#dateformat(thedate, 'dd/mm/')#"  / br /
	/cffunction
/cfcomponent

and here is the output;

I am in the CFM
10/Jun/2010
10/Jun/2010
I am in the CFC
10/06/2010
10/06/2010


As a best guess - I would be looking at the code used to insert /
update date columns in the database.
As I said previously in this thread, we dateformat(thedate, "-mm-
dd") in all hand written SQL that inserts/updates to ensure it is
persisted correctly.
it was the ONLY way e could find to ensure valid dates everytime - and
we spent a substantial amunt of time on trying to work it out, prior
to going down that path.
There may well be an "easier" option - and we ust donlt know about
it... but at least we can (now) guarantee that all dates are correct
in our database.

Gavin.

On Jun 9, 11:13am, Mike Kear afpwebwo...@gmail.com wrote:
  
  
Well i had to suck that back again and wished i could have completely
obliterated my previous email.  I had a mistake in the code i posted on my
example earlier.  But i have just found the exact scenario happening.

Inside my CFCs, i think American dates are always assumed.  I am setting a
date in my bean.  Even if i specifically set it using the code i quoted in
my last email ( i.e. PosBean.setTransDate( createdate("2010","06","10") )
for 10th June)  if i immediately output the date I get a different result
to what i get if i have it in a regular .cfm file.

cfdump var="#lsdateformat(posbean.getTransDate(), 'dd/mmm/')#" /
cfdump var="#dateformat(posbean.getTransDate(), 'dd/mmm/')#" /

This code in a .cfm file outputs two showing 10 June.  If i output from a
.cfc it shows the first as 10 June, and the second as 6 October.

So unless i'm mistaken, I get a different result in a .cfm page than i get
if i output from a cfc. The trouble is, it's the .cfc that is causing the
problem because its the cfc that creates the insert statement to the
database.

This is proving to be a particularly elusive problem. But since we use
dates to select records for a whole host of reports, it's essential that i
sort it out.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworkshttp://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month



On Wed, Jun 9, 2010 at 10:33 AM, Dale Fraser d...@fraser.id.au wrote:


  Its working
  




  createDate(year, month, day)
  




  2010,10,06 is 6th of October.
  




  Regards
  




  Dale Fraser
  




  http://dale.fraser.id.au
  




  http://cfmldocs.com
  




  http://learncf.com
  




  http://flexcf.com
  




  *From:* cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] *On
Behalf Of *Mike Kear
*Sent:* Wednesday, 9 June 2010 10:30 AM
*To:* cfaussie@googlegroups.com
*Subject:* Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005
  




  Believe it or not, I'm still worrying away at this date issue.  I dont
understand ColdFusion's insistence that we have to use American dates.
(This is CF9 Enterprise by the way)
  




  I create a date object, using the following:
  




  createdate("2010","10","06")  which is supposed to be year, month, day in
that order.  Then when i output the date in the next line it shows that
date as 06/Oct/2010
  




  It doesn't seem to make any difference whether i set a locale or not.
It's nothing to do with dateformat, the problem here is that I'm creating a
date using year-month-day and it's understanding it as year-day-month.
HUH??
  




  Here is the actual code:
  




  cfset testdate = createdate("2010","10","06") /
  




  cfoutput
  




  ptest date is #testdate# : #dateformat(testdate, "dd/mmm/")# /p
  




  /cfoutput
  




 

Re: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Andrew Scott
There is also another option, in ColdFusion-Editor Profile-Editors that
when a CFM / CFC is created you can use a template that suites your most
used.


On Wed, Jun 9, 2010 at 10:15 AM, Andrew Myers am2...@gmail.com wrote:

 Perfect Mark.  Thank you kindly.



-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Steve Onnis
the other cool thing in HomeSite is the Macro bit.  You could use JSCRIPT to
write your own macros that could be triggered with a keyboard shortcut. I
wrote a coupel to insert comments and stuff like that. Was a cool feature

  _  

From: Andrew Scott [mailto:andr...@andyscott.id.au] 
Sent: Wednesday, 9 June 2010 12:21 PM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] coldfusionmeetup.com


There is also another option, in ColdFusion-Editor Profile-Editors that
when a CFM / CFC is created you can use a template that suites your most
used.



On Wed, Jun 9, 2010 at 10:15 AM, Andrew Myers am2...@gmail.com wrote:


Perfect Mark.  Thank you kindly. 



-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
I have found i can specifically set a date using numerical values rather
than variables, to make absolutely certain i know what the value of the date
being inserted is.

If i set a variable which is a date object using the createdate() function,
 it reads the date properly.  If I use that same function to set a setter in
a bean,  it doesnt. Here's the specifics:
cfset testdate = createdate(2010,06,10) 
pDay: #day(testdate)#br /
Month:#month(testdate)#br /
Year: #year(testdate)#/p

This code shows year='2010', month='6', day='10'

But if i have a bean with a date value in it,  and set the date value like
this:
cfset PosBean.setTransDate( createdate(2010,06,10)  ) /
pDay: #day( posbean.getTransDate() )#br /
Month:#month(  posbean.getTransDate() )#br /
Year: #year( posbean.getTransDate() )#/p

This code shows year='2010', month=10', day='6'

If i use the bean value in the insert statement, it inserts the date with
month=10 and date=6.  If i use the #testdate# value in the insert statement,
 it inserts the date with month=6 and date=10.

The conclusion i am coming to is that a cfc will behave differently to a cfm
file. No??   Anyway, since the value i'm trying to insert into the
database is a value from the bean (along with all the other values of the
bean)  I'm always going to get the wrong value into the database aren't i?

-- 
Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Sean Corfield
What do the methods setTransDate() and getTransDate() look like? Is
there a declared property behind them? If so, what does that look
like?

On Tue, Jun 8, 2010 at 9:02 PM, Mike Kear afpwebwo...@gmail.com wrote:
 I have found i can specifically set a date using numerical values rather
 than variables, to make absolutely certain i know what the value of the date
 being inserted is.
 If i set a variable which is a date object using the createdate() function,
  it reads the date properly.  If I use that same function to set a setter in
 a bean,  it doesnt.     Here's the specifics:
 cfset testdate = createdate(2010,06,10) 
 pDay: #day(testdate)#br /
 Month:#month(testdate)#br /
 Year: #year(testdate)#/p
 This code shows year='2010', month='6', day='10'
 But if i have a bean with a date value in it,  and set the date value like
 this:
 cfset PosBean.setTransDate( createdate(2010,06,10)  ) /
 pDay: #day( posbean.getTransDate() )#br /
 Month:#month(  posbean.getTransDate() )#br /
 Year: #year( posbean.getTransDate() )#/p
 This code shows year='2010', month=10', day='6'
 If i use the bean value in the insert statement, it inserts the date with
 month=10 and date=6.  If i use the #testdate# value in the insert statement,
  it inserts the date with month=6 and date=10.
 The conclusion i am coming to is that a cfc will behave differently to a cfm
 file.     No??   Anyway, since the value i'm trying to insert into the
 database is a value from the bean (along with all the other values of the
 bean)  I'm always going to get the wrong value into the database aren't i?

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
This is the code for the getter and setter involved:

cffunction name=setTransDate access=public returntype=void
output=false
cfargument name=TransDate type=string required=true /
cfif isDate(arguments.TransDate)
cfset arguments.TransDate = dateformat(arguments.TransDate,DD/MM/) /
/cfif
cfset variables.instance.TransDate = arguments.TransDate /
/cffunction
cffunction name=getTransDate access=public returntype=string
output=false
cfreturn variables.instance.TransDate /
/cffunction

This is generated by the Rooibos code written by P Farrell



On Wed, Jun 9, 2010 at 2:07 PM, Sean Corfield seancorfi...@gmail.comwrote:

 What do the methods setTransDate() and getTransDate() look like? Is
 there a declared property behind them? If so, what does that look
 like?


Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Kym Kovan

On 9/06/2010 14:02, Mike Kear wrote:


If i set a variable which is a date object using the createdate()
function,  it reads the date properly.  If I use that same function to
set a setter in a bean,  it doesnt. Here's the specifics:
cfset testdate = createdate(2010,06,10) 
pDay: #day(testdate)#br /
Month:#month(testdate)#br /
Year: #year(testdate)#/p

This code shows year='2010', month='6', day='10'

But if i have a bean with a date value in it,  and set the date value
like this:
cfset PosBean.setTransDate( createdate(2010,06,10)  ) /
pDay: #day( posbean.getTransDate() )#br /
Month:#month(  posbean.getTransDate() )#br /
Year: #year( posbean.getTransDate() )#/p

This code shows year='2010', month=10', day='6'


So the next bit to check is the typing of the attributes going onto the 
CFC/bean and return type, etc...



--

Yours,

Kym Kovan
mbcomms.net.au

--
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Dale Fraser
Return type String could be the problem

 

Regards

Dale Fraser

 

http://dale.fraser.id.au

http://cfmldocs.com http://cfmldocs.com/ 

http://learncf.com

http://flexcf.com

 

From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf
Of Mike Kear
Sent: Wednesday, 9 June 2010 2:15 PM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

 

This is the code for the getter and setter involved: 

 

cffunction name=setTransDate access=public returntype=void
output=false

cfargument name=TransDate type=string
required=true /

cfif isDate(arguments.TransDate)

cfset arguments.TransDate =
dateformat(arguments.TransDate,DD/MM/) /

/cfif

cfset variables.instance.TransDate =
arguments.TransDate /

/cffunction

cffunction name=getTransDate access=public returntype=string
output=false

cfreturn variables.instance.TransDate /

/cffunction

 

This is generated by the Rooibos code written by P Farrell

 

 

 

On Wed, Jun 9, 2010 at 2:07 PM, Sean Corfield seancorfi...@gmail.com
wrote:

What do the methods setTransDate() and getTransDate() look like? Is
there a declared property behind them? If so, what does that look
like?

 

 

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Dale Fraser
Plus your doing a dateformat on it, its not needed, keep it as a date object
in the setter

 

Regards

Dale Fraser

 

http://dale.fraser.id.au

http://cfmldocs.com http://cfmldocs.com/ 

http://learncf.com

http://flexcf.com

 

From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf
Of Mike Kear
Sent: Wednesday, 9 June 2010 2:15 PM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

 

This is the code for the getter and setter involved: 

 

cffunction name=setTransDate access=public returntype=void
output=false

cfargument name=TransDate type=string
required=true /

cfif isDate(arguments.TransDate)

cfset arguments.TransDate =
dateformat(arguments.TransDate,DD/MM/) /

/cfif

cfset variables.instance.TransDate =
arguments.TransDate /

/cffunction

cffunction name=getTransDate access=public returntype=string
output=false

cfreturn variables.instance.TransDate /

/cffunction

 

This is generated by the Rooibos code written by P Farrell

 

 

 

On Wed, Jun 9, 2010 at 2:07 PM, Sean Corfield seancorfi...@gmail.com
wrote:

What do the methods setTransDate() and getTransDate() look like? Is
there a declared property behind them? If so, what does that look
like?

 

 

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Steve Onnis
I would have written it this way
 
cffunction name=setTransDate access=public returntype=void
output=false
cfargument name=TransDate type=date required=true /
cfset variables.instance.TransDate = arguments.TransDate /
/cffunction
 
cffunction name=getTransDate access=public returntype=date
output=false
cfreturn variables.instance.TransDate /
/cffunction
 
 
That way you get the same date object as you passed in and let the
cfargument validate the value being passed in.  Simple and straight forward
 
Steve

  _  

From: Mike Kear [mailto:afpwebwo...@gmail.com] 
Sent: Wednesday, 9 June 2010 2:15 PM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005


This is the code for the getter and setter involved:  

cffunction name=setTransDate access=public returntype=void
output=false
cfargument name=TransDate type=string required=true /
cfif isDate(arguments.TransDate)
cfset arguments.TransDate = dateformat(arguments.TransDate,DD/MM/) /
/cfif
cfset variables.instance.TransDate = arguments.TransDate /
/cffunction
cffunction name=getTransDate access=public returntype=string
output=false
cfreturn variables.instance.TransDate /
/cffunction

This is generated by the Rooibos code written by P Farrell



On Wed, Jun 9, 2010 at 2:07 PM, Sean Corfield seancorfi...@gmail.com
wrote:


What do the methods setTransDate() and getTransDate() look like? Is
there a declared property behind them? If so, what does that look
like?



 
Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month


-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
If I remove the date formatting stuff from the setter,  it seems to work ok.
   But I've been using the Rooibos bean generator without problems for ages.
 I have never had this problem with dates before.So i'm not sure what's
so different about this app.   Anyway,  if i do this with the setter:

cffunction name=setTransDate access=public returntype=void
output=false
cfargument name=TransDate type=date required=true /
cfset variables.instance.TransDate = arguments.TransDate /
/cffunction

then it seems to return a date object that the CFQUERYPARAM seems to like
and inserts the right way round.

I guess that's the workaround but i'm a bit nervous about deploying an
application where it behaves differently to other applications that work
quite successfully.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month


On Wed, Jun 9, 2010 at 2:15 PM, Kym Kovan dev-li...@mbcomms.net.au wrote:

 On 9/06/2010 14:02, Mike Kear wrote:


 If i set a variable which is a date object using the createdate()
 function,  it reads the date properly.  If I use that same function to
 set a setter in a bean,  it doesnt. Here's the specifics:
 cfset testdate = createdate(2010,06,10) 
 pDay: #day(testdate)#br /
 Month:#month(testdate)#br /
 Year: #year(testdate)#/p

 This code shows year='2010', month='6', day='10'

 But if i have a bean with a date value in it,  and set the date value
 like this:
 cfset PosBean.setTransDate( createdate(2010,06,10)  ) /
 pDay: #day( posbean.getTransDate() )#br /
 Month:#month(  posbean.getTransDate() )#br /
 Year: #year( posbean.getTransDate() )#/p

 This code shows year='2010', month=10', day='6'


 So the next bit to check is the typing of the attributes going onto the
 CFC/bean and return type, etc...



 --

 Yours,

 Kym Kovan
 mbcomms.net.au

 --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaus...@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.comcfaussie%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.




--

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Phil Haeusler

Mike,

This generated code looks like it is causing you problems.  As the bean 
converts the date to a string for storage, when it retrieves it back CF 
does a String  Date conversion which is something i've always seen 
problems with.


A quick hack would be to alter the cfreturn from

cfreturn variables.instance.TransDate /

to something like

cfreturn CreateDate(ListLast(variables.instance.TransDate, /), 
ListGetAt(variables.instance.TransDate, 2, /), 
ListFirst(variables.instance.TransDate, /))


To ensure there is no ambiguity.  If that works ok, then you could look 
for a neater solution.


Phil




On 9/06/10 2:15 PM, Mike Kear wrote:

This is the code for the getter and setter involved:

cffunction name=setTransDate access=public returntype=void 
output=false

cfargument name=TransDate type=string required=true /
cfif isDate(arguments.TransDate)
cfset arguments.TransDate = 
dateformat(arguments.TransDate,DD/MM/) /

/cfif
cfset variables.instance.TransDate = arguments.TransDate /
/cffunction
cffunction name=getTransDate access=public returntype=string 
output=false

cfreturn variables.instance.TransDate /
/cffunction

This is generated by the Rooibos code written by P Farrell



On Wed, Jun 9, 2010 at 2:07 PM, Sean Corfield seancorfi...@gmail.com 
mailto:seancorfi...@gmail.com wrote:


What do the methods setTransDate() and getTransDate() look like? Is
there a declared property behind them? If so, what does that look
like?

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET http://ASP.NET hosting 
from AUD$15/month

--
You received this message because you are subscribed to the Google 
Groups cfaussie group.

To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.


--
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Steve Onnis
the thing is the function is messing around with the date object when it
doesnt need to be.

  _  

From: Mike Kear [mailto:afpwebwo...@gmail.com] 
Sent: Wednesday, 9 June 2010 2:26 PM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005


If I remove the date formatting stuff from the setter,  it seems to work ok.
But I've been using the Rooibos bean generator without problems for ages.  I
have never had this problem with dates before.So i'm not sure what's so
different about this app.   Anyway,  if i do this with the setter:  

cffunction name=setTransDate access=public returntype=void
output=false
cfargument name=TransDate type=date required=true /
cfset variables.instance.TransDate = arguments.TransDate /
/cffunction

then it seems to return a date object that the CFQUERYPARAM seems to like
and inserts the right way round.

I guess that's the workaround but i'm a bit nervous about deploying an
application where it behaves differently to other applications that work
quite successfully.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month


On Wed, Jun 9, 2010 at 2:15 PM, Kym Kovan dev-li...@mbcomms.net.au wrote:


On 9/06/2010 14:02, Mike Kear wrote:



If i set a variable which is a date object using the createdate()
function,  it reads the date properly.  If I use that same function to
set a setter in a bean,  it doesnt. Here's the specifics:
cfset testdate = createdate(2010,06,10) 
pDay: #day(testdate)#br /
Month:#month(testdate)#br /
Year: #year(testdate)#/p

This code shows year='2010', month='6', day='10'

But if i have a bean with a date value in it,  and set the date value
like this:
cfset PosBean.setTransDate( createdate(2010,06,10)  ) /
pDay: #day( posbean.getTransDate() )#br /
Month:#month(  posbean.getTransDate() )#br /
Year: #year( posbean.getTransDate() )#/p

This code shows year='2010', month=10', day='6'



So the next bit to check is the typing of the attributes going onto the
CFC/bean and return type, etc... 



-- 

Yours,

Kym Kovan
mbcomms.net.au

-- 

You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com
mailto:cfaussie%2bunsubscr...@googlegroups.com .
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.






-- 



-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Dale Fraser
Somewhere on that server setting the CF locale properly will fix the
problem.

 

If its an existing legacy app as you mentioned, something in the app might
be playing with the locale.

 

At least its your code and not SQL so you can fix it.

 

Regards

Dale Fraser

 

http://dale.fraser.id.au

http://cfmldocs.com http://cfmldocs.com/ 

http://learncf.com

http://flexcf.com

 

From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf
Of Mike Kear
Sent: Wednesday, 9 June 2010 2:26 PM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

 

If I remove the date formatting stuff from the setter,  it seems to work ok.
But I've been using the Rooibos bean generator without problems for ages.  I
have never had this problem with dates before.So i'm not sure what's so
different about this app.   Anyway,  if i do this with the setter: 

 

cffunction name=setTransDate access=public returntype=void
output=false

cfargument name=TransDate type=date required=true /

cfset variables.instance.TransDate =
arguments.TransDate /

/cffunction

 

then it seems to return a date object that the CFQUERYPARAM seems to like
and inserts the right way round.

 

I guess that's the workaround but i'm a bit nervous about deploying an
application where it behaves differently to other applications that work
quite successfully.

 

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

 

 

On Wed, Jun 9, 2010 at 2:15 PM, Kym Kovan dev-li...@mbcomms.net.au wrote:

On 9/06/2010 14:02, Mike Kear wrote:


If i set a variable which is a date object using the createdate()
function,  it reads the date properly.  If I use that same function to
set a setter in a bean,  it doesnt. Here's the specifics:
cfset testdate = createdate(2010,06,10) 
pDay: #day(testdate)#br /
Month:#month(testdate)#br /
Year: #year(testdate)#/p

This code shows year='2010', month='6', day='10'

But if i have a bean with a date value in it,  and set the date value
like this:
cfset PosBean.setTransDate( createdate(2010,06,10)  ) /
pDay: #day( posbean.getTransDate() )#br /
Month:#month(  posbean.getTransDate() )#br /
Year: #year( posbean.getTransDate() )#/p

This code shows year='2010', month=10', day='6'

 

So the next bit to check is the typing of the attributes going onto the
CFC/bean and return type, etc...




-- 

Yours,

Kym Kovan
mbcomms.net.au

-- 

You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com
mailto:cfaussie%2bunsubscr...@googlegroups.com .
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.




-- 

-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



[cfaussie] Re: coldfusionmeetup.com

2010-06-08 Thread Andrew
I downloaded Michael Sharmans snippets from this location:

http://www.chapter31.com/cfeclipse-snippets/

However the stuff in keyCombos.properties didn't seem to take effect.

Is there a way to import these as well, or do I have to manually reset
them all?

On Jun 9, 12:25 pm, Steve Onnis st...@cfcentral.com.au wrote:
 the other cool thing in HomeSite is the Macro bit.  You could use JSCRIPT to
 write your own macros that could be triggered with a keyboard shortcut. I
 wrote a coupel to insert comments and stuff like that. Was a cool feature

   _  

 From: Andrew Scott [mailto:andr...@andyscott.id.au]
 Sent: Wednesday, 9 June 2010 12:21 PM
 To: cfaussie@googlegroups.com
 Subject: Re: [cfaussie] coldfusionmeetup.com

 There is also another option, in ColdFusion-Editor Profile-Editors that
 when a CFM / CFC is created you can use a template that suites your most
 used.

 On Wed, Jun 9, 2010 at 10:15 AM, Andrew Myers am2...@gmail.com wrote:

 Perfect Mark.  Thank you kindly.

 --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaus...@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



[cfaussie] The solution: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
I'm still testing, but it looks like at long last this problem is solved.
For those who have been following this saga,  the issue is that no matter
what way I put the date into the code, it always seemed to be stored in the
database in an erratic way.  For dates earlier than the 13th of the month
(and therefore ambiguous as to which is the day and which is the month in
the date string) the database would store -dd-mm  and for the 13th or
later, it would store -mm-dd, which is what i wanted for all of the
dates.

It boiled down to a code generator that i've been using without any issues
for a long time.  The setter and getter for any date fields was like the
following:
 
===
cffunction name=setTransDate access=public returntype=void
output=false
cfargument name=TransDate type=string required=true /
cfif isDate(arguments.TransDate)
cfset arguments.TransDate = dateformat(arguments.TransDate,DD/MM/) /
/cfif
cfset variables.instance.TransDate = trim(arguments.TransDate) /
/cffunction
cffunction name=getTransDate access=public returntype=string
output=false
cfreturn variables.instance.TransDate /
/cffunction
 
===


This date formatting was apparently what's causing the problem.  I'm not
sure why because I'd have thought it would either do nothing (i.e. convert
dd/mm/ into dd/mm/) or correct an American format date to Australian
format date.

But when i removed that manipulation,  the problem went away.   I'm a little
nervous about just using it, because I think i should know why the former
code was a problem but that will have to wait for another day.   Here's the
code that seems to give me the desired result:

 
===
cffunction name=setTransDate access=public returntype=void
output=false
cfargument name=TransDate type=date required=true /
cfset variables.instance.TransDate = arguments.TransDate /
/cffunction
cffunction name=getTransDate access=public returntype=date
output=false
cfreturn variables.instance.TransDate /
/cffunction
 
===

I am MOST grateful to all those people - too numerous to mention now - who
have helped me through this.  Because it goes back to a code generator that
I've never had any issues with while writing maybe 100 applications,  I
didn't even look at that.  It was a LONG way down the list of possible
suspects.   I'll write and make sure Pete Farrell is in the loop on this.

Thank you all.


Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: coldfusionmeetup.com

2010-06-08 Thread Andrew Myers

At the risk of sounding like I'm talking to myself... :-)

I found the answer - I just copied over the stuff from the sharmo  
directory, and updated the value accordingly and it's all good now.


Sweeet

On Wed, 09 Jun 2010 15:18:50 +1000, Andrew am2...@gmail.com wrote:


I downloaded Michael Sharmans snippets from this location:

http://www.chapter31.com/cfeclipse-snippets/

However the stuff in keyCombos.properties didn't seem to take effect.

Is there a way to import these as well, or do I have to manually reset
them all?

On Jun 9, 12:25 pm, Steve Onnis st...@cfcentral.com.au wrote:
the other cool thing in HomeSite is the Macro bit.  You could use  
JSCRIPT to
write your own macros that could be triggered with a keyboard shortcut.  
I
wrote a coupel to insert comments and stuff like that. Was a cool  
feature


  _  
From: Andrew Scott [mailto:andr...@andyscott.id.au]

Sent: Wednesday, 9 June 2010 12:21 PM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] coldfusionmeetup.com

There is also another option, in ColdFusion-Editor Profile-Editors that
when a CFM / CFC is created you can use a template that suites your most
used.

On Wed, Jun 9, 2010 at 10:15 AM, Andrew Myers am2...@gmail.com wrote:

Perfect Mark.  Thank you kindly.

--
You received this message because you are subscribed to the Google  
Groups

cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group  
athttp://groups.google.com/group/cfaussie?hl=en.


--
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.