Passing a Date Time Value to a function
It's been one of those days already - can anyone tell me why the time gets stripped out? I'm aware that I'm using 'date' as an argument type, but datetime throws an error and there's nothing in CF8 docs on it... How do I preserve the time data? cffunction name=dateFormatter2 returntype=string cfargument name=startDate type=date cfargument name=endDate type=date cfscript var result =; startDate=dateFormat(arguments.startdate, 'dd '); startTime=timeFormat(arguments.startdate, HH:MM); endDate=dateFormat(arguments.enddate, 'dd '); endTime=timeFormat(arguments.enddate, HH:MM); /cfscript cfsavecontent variable=result cfoutputStart: #startDate#, #startTime# br /End: #endDate#, #endTime#/cfoutput /cfsavecontent cfreturn result /cffunction cfoutput #dateFormatter2(now(),now())# /cfoutput Cheers! T ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336349 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Passing a Date Time Value to a function
It's because you re-used the variable names startDate and endDate, so you re-wrote the value of each variable to strip out the time and then asked for the time. Always be sure to 'var' all variables in a function, and you'll avoid the snafu. If you do the following, you'll even get a runtime error letting you know the problem (cannot var a variable with the same name as an argument): cffunction name=dateFormatter2 returntype=string access=private output=No cfargument name=startDate type=date required=Yes / cfargument name=endDate type=date required=Yes / cfscript var result = ; var startDate = ; var startTime = ; var endDate = ; var endTime = ; startDate = dateFormat(arguments.startDate, dd ); startTime = timeFormat(arguments.startDate, HH:mm); endDate = dateFormat(arguments.endDate, dd ); endTime = timeFormat(arguments.endDate, HH:mm); /cfscript cfsavecontent variable=result cfoutput Start: #startDate#, #startTime# br /End: #endDate#, #endTime# /cfoutput /cfsavecontent cfreturn result / /cffunction cfoutput #dateFormatter2(now(), now())# /cfoutput Use different var names, and it works fine: cffunction name=dateFormatter2 returntype=string access=private output=No cfargument name=startDate type=date required=Yes / cfargument name=endDate type=date required=Yes / cfscript var result = ; var start = ; var startTime = ; var end = ; var endTime = ; start = dateFormat(arguments.startDate, dd ); startTime = timeFormat(arguments.startDate, HH:mm); end = dateFormat(arguments.endDate, dd ); endTime = timeFormat(arguments.endDate, HH:mm); /cfscript cfsavecontent variable=result cfoutput Start: #start#, #startTime# br /End: #end#, #endTime# /cfoutput /cfsavecontent cfreturn result / /cffunction cfoutput #dateFormatter2(now(), now())# /cfoutput From: Tom King mailingli...@oxalto.co.uk Sent: Wednesday, August 18, 2010 8:26 AM To: cf-talk cf-talk@houseoffusion.com Subject: Passing a Date Time Value to a function It's been one of those days already - can anyone tell me why the time gets stripped out? I'm aware that I'm using 'date' as an argument type, but datetime throws an error and there's nothing in CF8 docs on it... How do I preserve the time data? cffunction name=dateFormatter2 returntype=string cfargument name=startDate type=date cfargument name=endDate type=date cfscript var result =; startDate=dateFormat(arguments.startdate, 'dd '); startTime=timeFormat(arguments.startdate, HH:MM); endDate=dateFormat(arguments.enddate, 'dd '); endTime=timeFormat(arguments.enddate, HH:MM); /cfscript cfsavecontent variable=result cfoutputStart: #startDate#, #startTime# br /End: #endDate#, #endTime#/cfoutput /cfsavecontent cfreturn result /cffunction cfoutput #dateFormatter2(now(),now())# /cfoutput Cheers! T ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336350 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Passing a Date Time Value to a function
Brilliant- that's got it, thanks. Can't really believe I've never hit that error in the past 6 years... :) Cheers! T On 18 August 2010 13:48, Jason Fisher ja...@wanax.com wrote: It's because you re-used the variable names startDate and endDate, so you re-wrote the value of each variable to strip out the time and then asked for the time. Always be sure to 'var' all variables in a function, and you'll avoid the snafu. If you do the following, you'll even get a runtime error letting you know the problem (cannot var a variable with the same name as an argument): cffunction name=dateFormatter2 returntype=string access=private output=No cfargument name=startDate type=date required=Yes / cfargument name=endDate type=date required=Yes / cfscript var result = ; var startDate = ; var startTime = ; var endDate = ; var endTime = ; startDate = dateFormat(arguments.startDate, dd ); startTime = timeFormat(arguments.startDate, HH:mm); endDate = dateFormat(arguments.endDate, dd ); endTime = timeFormat(arguments.endDate, HH:mm); /cfscript cfsavecontent variable=result cfoutput Start: #startDate#, #startTime# br /End: #endDate#, #endTime# /cfoutput /cfsavecontent cfreturn result / /cffunction cfoutput #dateFormatter2(now(), now())# /cfoutput Use different var names, and it works fine: cffunction name=dateFormatter2 returntype=string access=private output=No cfargument name=startDate type=date required=Yes / cfargument name=endDate type=date required=Yes / cfscript var result = ; var start = ; var startTime = ; var end = ; var endTime = ; start = dateFormat(arguments.startDate, dd ); startTime = timeFormat(arguments.startDate, HH:mm); end = dateFormat(arguments.endDate, dd ); endTime = timeFormat(arguments.endDate, HH:mm); /cfscript cfsavecontent variable=result cfoutput Start: #start#, #startTime# br /End: #end#, #endTime# /cfoutput /cfsavecontent cfreturn result / /cffunction cfoutput #dateFormatter2(now(), now())# /cfoutput From: Tom King mailingli...@oxalto.co.uk Sent: Wednesday, August 18, 2010 8:26 AM To: cf-talk cf-talk@houseoffusion.com Subject: Passing a Date Time Value to a function It's been one of those days already - can anyone tell me why the time gets stripped out? I'm aware that I'm using 'date' as an argument type, but datetime throws an error and there's nothing in CF8 docs on it... How do I preserve the time data? cffunction name=dateFormatter2 returntype=string cfargument name=startDate type=date cfargument name=endDate type=date cfscript var result =; startDate=dateFormat(arguments.startdate, 'dd '); startTime=timeFormat(arguments.startdate, HH:MM); endDate=dateFormat(arguments.enddate, 'dd '); endTime=timeFormat(arguments.enddate, HH:MM); /cfscript cfsavecontent variable=result cfoutputStart: #startDate#, #startTime# br /End: #endDate#, #endTime#/cfoutput /cfsavecontent cfreturn result /cffunction cfoutput #dateFormatter2(now(),now())# /cfoutput Cheers! T ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336351 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CF and date Time DB Problems
Hi I am trying to insert the current date and time into an Oracle db using the following cfqueryparam cfsqltype=cf_sql_varchar value=#LSDateFormat(Now(), dd-mmm-)# #LSTimeFormat(Now())# But I am getting the following coldfusion error from the database? Error Executing Database Query. [Macromedia][Oracle JDBC Driver][Oracle]ORA-01830: date format picture ends before converting entire input string Any ideas on what's going wrong? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325519 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CF and date Time DB Problems
Is the column a date or a varchar - because you're using a varchar cfsqltype. I usually use the Oracle to_date() function to insert a date/time. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/8/18 Ian Vaughan i.vaug...@neath-porttalbot.gov.uk: Hi I am trying to insert the current date and time into an Oracle db using the following cfqueryparam cfsqltype=cf_sql_varchar value=#LSDateFormat(Now(), dd-mmm-)# #LSTimeFormat(Now())# But I am getting the following coldfusion error from the database? Error Executing Database Query. [Macromedia][Oracle JDBC Driver][Oracle]ORA-01830: date format picture ends before converting entire input string Any ideas on what's going wrong? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325521 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CF and date Time DB Problems
Is the column a date or a varchar - because you're using a varchar cfsqltype. I usually use the Oracle to_date() function to insert a date/time. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ I use MS SQL Server, but I think you could use something like this. cfqueryparam value=#now()# CFSQLType=cf_sql_timestamp / If this doesn't work, try this... cfqueryparam value=#CreateODBCTime(now())# CFSQLType=cf_sql_timestamp / ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325522 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CF and date Time DB Problems
Of course on Oracle the easiest way to insert the current time and date is to insert SYSDATE (if the CF server and the Oracle server agree on the current time, anyway). mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/8/18 Stephen Weyrick sweyr...@gmail.com: Is the column a date or a varchar - because you're using a varchar cfsqltype. I usually use the Oracle to_date() function to insert a date/time. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ I use MS SQL Server, but I think you could use something like this. cfqueryparam value=#now()# CFSQLType=cf_sql_timestamp / If this doesn't work, try this... cfqueryparam value=#CreateODBCTime(now())# CFSQLType=cf_sql_timestamp / ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325524 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CF and date Time DB Problems
On Tue, Aug 18, 2009 at 11:42 AM, Stephen Weyricksweyr...@gmail.com wrote: If this doesn't work, try this... cfqueryparam value=#CreateODBCTime(now())# CFSQLType=cf_sql_timestamp / I'm pretty sure the createODBCDate() function (and like functions) are only necessary when you're NOT using cfqueryparam. -- Rick Root New Brian Vander Ark Album, songs in the music player and cool behind the scenes video at www.myspace.com/brianvanderark ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325530 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Newbie ... Date / Time formatting
I am having a problem with erroneous MINUTES in my DateTime creation/formatting. The rest of the DateTime comes out correctly.LINK OUTPUT ... Date Formatting tests vStartDate = 01/01/2000 vEndDate = 14/4/2009 CreateDateTime (vStartDate) = {ts '2000-01-01 00:00:00'} DateFormat of the above = 2000-01-01 00:01:00 CreateDateTime (vEndDate) = {ts '2009-04-14 23:59:59'} DateFormat of the above = 2009-04-14 23:04:59 AFFECTED CODE ... CFset vDate = CreateDateTime(vStartYear,StartMonth,StartDay,00,00,00) / CFset vStart = DateFormat(vDate, -mm-dd HH:mm:ss) / CFset vDate = CreateDateTime(vEndYear,EndMonth,EndDay,23,59,59) / CFset vEnd = DateFormat(vDate, -mm-dd HH:mm:ss) / -- I am using the free version of SPAMfighter. We are a community of 6 million users fighting spam. SPAMfighter has removed 12962 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len The Professional version does not have this message ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321607 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Newbie ... Date / Time formatting
You can't output a time with dateformat() - you need to use timeformat() for that bit. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/4/15 BobSharp bobsh...@ntlworld.com: I am having a problem with erroneous MINUTES in my DateTime creation/formatting. The rest of the DateTime comes out correctly. LINK CFset vDate = CreateDateTime(vStartYear,StartMonth,StartDay,00,00,00) / CFset vStart = DateFormat(vDate, -mm-dd HH:mm:ss) / CFset vDate = CreateDateTime(vEndYear,EndMonth,EndDay,23,59,59) / CFset vEnd = DateFormat(vDate, -mm-dd HH:m ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321610 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Newbie ... Date / Time formatting
Was actually trying to find a way of using DateTime fields in queries. Just found TIMESTAMP type for CFQueryParam. CFqueryparam cfsqltype=cf_sql_timestamp It was the DATE type that was causing the errors in the comparisons. CFqueryparam cfsqltype=cf_sql_date - Original Message - From: James Holmes james.hol...@gmail.com To: cf-talk cf-talk@houseoffusion.com Sent: Wednesday, April 15, 2009 2:22 PM Subject: Re: Newbie ... Date / Time formatting You can't output a time with dateformat() - you need to use timeformat() for that bit. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/4/15 BobSharp bobsh...@ntlworld.com: I am having a problem with erroneous MINUTES in my DateTime creation/formatting. The rest of the DateTime comes out correctly. LINK CFset vDate = CreateDateTime(vStartYear,StartMonth,StartDay,00,00,00) / CFset vStart = DateFormat(vDate, -mm-dd HH:mm:ss) / CFset vDate = CreateDateTime(vEndYear,EndMonth,EndDay,23,59,59) / CFset vEnd = DateFormat(vDate, -mm-dd HH:m ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321633 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
FYI: Windows DATE/TIME Glitch affecting CF DATE/TIME Functions
I noticed a little Windows bug this AM that may affect some of you. My system clock was showing the correct time, but my CF generated dates and times were an hour off (behind an hour). This was affecting data base postings, timestamps, etc. To correct this I had to turn off the systems Automatically Adjust for Daylight Savings Time option and manually reset the system date/time to the correct time. Apparently Windows adjusted only the clock display and not the system date/time. Everyone running Windows systems may want to check this if they are using CF date/time functions. I'm sure not all version of Windows have this issue, but apparently some do. Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320266 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: FYI: Windows DATE/TIME Glitch affecting CF DATE/TIME Functions
Is your version of Java patched for the latest daylight savings dates? mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/3/10 Robert Harrison rob...@austin-williams.com: I noticed a little Windows bug this AM that may affect some of you. My system clock was showing the correct time, but my CF generated dates and times were an hour off (behind an hour). This was affecting data base postings, timestamps, etc. To correct this I had to turn off the systems Automatically Adjust for Daylight Savings Time option and manually reset the system date/time to the correct time. Apparently Windows adjusted only the clock display and not the system date/time. Everyone running Windows systems may want to check this if they are using CF date/time functions. I'm sure not all version of Windows have this issue, but apparently some do. Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320267 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: FYI: Windows DATE/TIME Glitch affecting CF DATE/TIME Functions
Is your version of Java patched for the latest daylight savings dates? mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320281 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: (sot) CF and Section 508 compliance a 508 compliant date/time picker
Thank you Sandra for the tute. Good stuff. I would also like thank everyone for their assistance. I have a good handle on things. I was a bit confused by the JS aspect. The language in the actual specs is a bit hazy. Again, thanx! G! On Fri, Feb 20, 2009 at 7:43 PM, Sandra Clark slli...@shayna.com wrote: A good tutorial to start with would be http://jimthatcher.com/webcourse1.htm Basically, your site has to work with Javascript turned off. Check things by using just the keyboard, I've audited sites with date widgets where yes, the text could be entered manually, but the keyboard hit the date picker first and there was no way to tab out of it. Sandra Clark = http://www.shayna.com Training and Consulting in CSS and Accessibility Team Fusebox -Original Message- From: Gerald Guido [mailto:gerald.gu...@gmail.com] Sent: Friday, February 20, 2009 1:22 PM To: cf-talk Subject: (sot) CF and Section 508 compliance a 508 compliant date/time picker We just picked up a site that needs to be 508 compliant. I am getting a crash course right now. I (or any of us really) never made a site/app that needed to be 508 compliant. My only concern is the use of JS. It is basically a data entry and reporting app and there is going to be a TON of form fields. We plan to use JS for form validation (CFForm and/or other means if need be) and was wondering if using CFForm will be an issue. Yes I know... we shouldn't use CFForm etc.. but it is uber-crunch time and that is what our code generator spits out. Along the lines of validation, will we need server side validation as well? Also.. Does anyone know of any 508 compliant date/time pickers? Those are going to be the only JS widgets that may be an issue. And lastly, anyone care to pass on any general advice or gotchas and/or advice on that to be aware of and/or be careful of etc. As always, many TIA. G! -- Gerald Guido http://www.myinternetisbroken.com To invent, you need a good imagination and a pile of junk. -- Thomas A. Edison ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319798 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: (sot) CF and Section 508 compliance a 508 compliant date/time picker
Regarding ARIA. Aria is not compatible with Section 508 as it stands now. If you are trying to comply with Section 508, ARIA will not help. Having said that, Section 508 is in a refresh, but has not yet been finalized by the Access Board. The Section 508 refresh does in fact address Aria by allowing Javascript that exposes, states, roles and properties to User Agents. WCAG 2.0 has the same requirements. At this time the only javascript framework that has widgets that are ARIA compliant is Dojo (dojotoolkit.org). FireFox supports Aria now as does Opera. IE 8 will support ARIA, I still haven't found out about Safari. Most of the major screen readers (Jaws and Window Eyes) support ARIA in their latest versions. JQuery does not support ARIA at this time, although I understand that there are plans to do so in a future release. -Original Message- From: Judah McAuley [mailto:ju...@wiredotter.com] Sent: Friday, February 20, 2009 11:31 PM To: cf-talk Subject: Re: (sot) CF and Section 508 compliance a 508 compliant date/time picker I'd also recommend looking at the ARIA (accessible rich internet applications) initiative through the W3C: http://www.w3.org/WAI/PF/aria-practices/ You should also check out actual screen readers as modern screen readers do interact with javascript to some extent and that should be taken into account. There is a plugin for Firefox called Fire Vox (http://www.firevox.clcworld.net/) that I've heard about but haven't used. Hope that helps, Judah On Fri, Feb 20, 2009 at 4:43 PM, Sandra Clark slli...@shayna.com wrote: A good tutorial to start with would be http://jimthatcher.com/webcourse1.htm Basically, your site has to work with Javascript turned off. Check things by using just the keyboard, I've audited sites with date widgets where yes, the text could be entered manually, but the keyboard hit the date picker first and there was no way to tab out of it. Sandra Clark = http://www.shayna.com Training and Consulting in CSS and Accessibility Team Fusebox -Original Message- From: Gerald Guido [mailto:gerald.gu...@gmail.com] Sent: Friday, February 20, 2009 1:22 PM To: cf-talk Subject: (sot) CF and Section 508 compliance a 508 compliant date/time picker We just picked up a site that needs to be 508 compliant. I am getting a crash course right now. I (or any of us really) never made a site/app that needed to be 508 compliant. My only concern is the use of JS. It is basically a data entry and reporting app and there is going to be a TON of form fields. We plan to use JS for form validation (CFForm and/or other means if need be) and was wondering if using CFForm will be an issue. Yes I know... we shouldn't use CFForm etc.. but it is uber-crunch time and that is what our code generator spits out. Along the lines of validation, will we need server side validation as well? Also.. Does anyone know of any 508 compliant date/time pickers? Those are going to be the only JS widgets that may be an issue. And lastly, anyone care to pass on any general advice or gotchas and/or advice on that to be aware of and/or be careful of etc. As always, many TIA. G! -- Gerald Guido http://www.myinternetisbroken.com To invent, you need a good imagination and a pile of junk. -- Thomas A. Edison ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319662 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: (sot) CF and Section 508 compliance a 508 compliant date/time picker
And Ext JS will support Aria/508 in version 3 which comes out April 14th. And yes, you are correct on the technical requirements of 508 but since 508 applies in legal terms to a surprisingly small section of the populace, most treat it as a guideline for trying to achieve a reasonable level of accessibility. Judah On Sat, Feb 21, 2009 at 6:32 PM, Sandra Clark slli...@shayna.com wrote: Regarding ARIA. Aria is not compatible with Section 508 as it stands now. If you are trying to comply with Section 508, ARIA will not help. Having said that, Section 508 is in a refresh, but has not yet been finalized by the Access Board. The Section 508 refresh does in fact address Aria by allowing Javascript that exposes, states, roles and properties to User Agents. WCAG 2.0 has the same requirements. At this time the only javascript framework that has widgets that are ARIA compliant is Dojo (dojotoolkit.org). FireFox supports Aria now as does Opera. IE 8 will support ARIA, I still haven't found out about Safari. Most of the major screen readers (Jaws and Window Eyes) support ARIA in their latest versions. JQuery does not support ARIA at this time, although I understand that there are plans to do so in a future release. -Original Message- From: Judah McAuley [mailto:ju...@wiredotter.com] Sent: Friday, February 20, 2009 11:31 PM To: cf-talk Subject: Re: (sot) CF and Section 508 compliance a 508 compliant date/time picker I'd also recommend looking at the ARIA (accessible rich internet applications) initiative through the W3C: http://www.w3.org/WAI/PF/aria-practices/ You should also check out actual screen readers as modern screen readers do interact with javascript to some extent and that should be taken into account. There is a plugin for Firefox called Fire Vox (http://www.firevox.clcworld.net/) that I've heard about but haven't used. Hope that helps, Judah On Fri, Feb 20, 2009 at 4:43 PM, Sandra Clark slli...@shayna.com wrote: A good tutorial to start with would be http://jimthatcher.com/webcourse1.htm Basically, your site has to work with Javascript turned off. Check things by using just the keyboard, I've audited sites with date widgets where yes, the text could be entered manually, but the keyboard hit the date picker first and there was no way to tab out of it. Sandra Clark = http://www.shayna.com Training and Consulting in CSS and Accessibility Team Fusebox -Original Message- From: Gerald Guido [mailto:gerald.gu...@gmail.com] Sent: Friday, February 20, 2009 1:22 PM To: cf-talk Subject: (sot) CF and Section 508 compliance a 508 compliant date/time picker We just picked up a site that needs to be 508 compliant. I am getting a crash course right now. I (or any of us really) never made a site/app that needed to be 508 compliant. My only concern is the use of JS. It is basically a data entry and reporting app and there is going to be a TON of form fields. We plan to use JS for form validation (CFForm and/or other means if need be) and was wondering if using CFForm will be an issue. Yes I know... we shouldn't use CFForm etc.. but it is uber-crunch time and that is what our code generator spits out. Along the lines of validation, will we need server side validation as well? Also.. Does anyone know of any 508 compliant date/time pickers? Those are going to be the only JS widgets that may be an issue. And lastly, anyone care to pass on any general advice or gotchas and/or advice on that to be aware of and/or be careful of etc. As always, many TIA. G! -- Gerald Guido http://www.myinternetisbroken.com To invent, you need a good imagination and a pile of junk. -- Thomas A. Edison ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319667 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
(sot) CF and Section 508 compliance a 508 compliant date/time picker
We just picked up a site that needs to be 508 compliant. I am getting a crash course right now. I (or any of us really) never made a site/app that needed to be 508 compliant. My only concern is the use of JS. It is basically a data entry and reporting app and there is going to be a TON of form fields. We plan to use JS for form validation (CFForm and/or other means if need be) and was wondering if using CFForm will be an issue. Yes I know... we shouldn't use CFForm etc.. but it is uber-crunch time and that is what our code generator spits out. Along the lines of validation, will we need server side validation as well? Also.. Does anyone know of any 508 compliant date/time pickers? Those are going to be the only JS widgets that may be an issue. And lastly, anyone care to pass on any general advice or gotchas and/or advice on that to be aware of and/or be careful of etc. As always, many TIA. G! -- Gerald Guido http://www.myinternetisbroken.com To invent, you need a good imagination and a pile of junk. -- Thomas A. Edison ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319630 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: (sot) CF and Section 508 compliance a 508 compliant date/time picker
Gerald Guido wrote: using CFForm will be an issue. Yes I know... we shouldn't use CFForm etc.. but it is uber-crunch time and that is what our code generator spits out. I'm curious, what are the current torch and pitchfork arguments against using CFFORM? In the past it was terrible and I still have nightmares about the code it generated, but it seems to be a lot more reasonable in the more recent versions of ColdFusion. I still couple it with server-side validation in case JavaScript isn't enabled, but I haven't found anything awful about it lately myself. -Justin ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319631 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: (sot) CF and Section 508 compliance a 508 compliant date/time picker
Also.. Does anyone know of any 508 compliant date/time pickers? Those are going to be the only JS widgets that may be an issue. Any date-picker should be fine, provided that the widget is used to populate a text field that can also be manually entered. I integrated the Dynarch widget into the onTap framework last year. -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 817.385.0301 http://onTap.riaforge.org/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319632 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: (sot) CF and Section 508 compliance a 508 compliant date/time picker
Gerald, There are web developers and programmers who make it part of their life work to make sure everything that is created by them is Section 508 compatible. Frankly, it is the right thing to do. Being under 'crunch', I feel for you. Unless you are editing a site that was already compliant, then researching what needs to be done may hold you back on actual development for a little while (while researching) and then your development will be slower, since you will be doing things to the code that you are probably not used to doing. Things to consider: 1. Section 508 is not JUST for the people with limited or no sight. It is also for people who are color-blind, have difficulty detecting 'shades' of color, are deaf (in the case of sites with sound or video with sound), etc. 2. A properly configured section 508 site starts from the ground up. There are things that can be done to help a site get to that point after it has already been built, but the 508 considerations should be considered while in the design stage. 3. For the limited or no sight users, their browser will have 'screen reader' technology combined with it. This means that all of the text in your site will be read to the user. This includes Alt tags and Title tags. (you are using those, right?) 4. To best mimic the screen readers progression, you can turn off CSS and Javascript in your browser and then view your page. The content that is displayed to the screen should have a natural flow. Navigation at the top, heading text, content text, etc. 5. For table data, you should verse yourself (if you don't already know) in the use of the TH tags, the Caption tags as well as the title, longdesc, and other 'explanatory' tag attributes. If I were you, with the deadline that you describe, I would find out from the client what exact level of Section 508 they are looking for. (it is a 'leveled' law that defines the 'basics' and then defines extended needs.) Good Luck, William -Original Message- From: Gerald Guido [mailto:gerald.gu...@gmail.com] Sent: Friday, February 20, 2009 10:22 AM To: cf-talk Subject: (sot) CF and Section 508 compliance a 508 compliant date/time picker We just picked up a site that needs to be 508 compliant. I am getting a crash course right now. I (or any of us really) never made a site/app that needed to be 508 compliant. My only concern is the use of JS. It is basically a data entry and reporting app and there is going to be a TON of form fields. We plan to use JS for form validation (CFForm and/or other means if need be) and was wondering if using CFForm will be an issue. Yes I know... we shouldn't use CFForm etc.. but it is uber-crunch time and that is what our code generator spits out. Along the lines of validation, will we need server side validation as well? Also.. Does anyone know of any 508 compliant date/time pickers? Those are going to be the only JS widgets that may be an issue. And lastly, anyone care to pass on any general advice or gotchas and/or advice on that to be aware of and/or be careful of etc. As always, many TIA. G! -- Gerald Guido http://www.myinternetisbroken.com To invent, you need a good imagination and a pile of junk. -- Thomas A. Edison ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319635 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: (sot) CF and Section 508 compliance a 508 compliant date/time picker
Any date-picker should be fine, provided that the widget is used to populate a text field that can also be manually entered. Thanx Ike, So if I understand correctly, if I have a date/time widgets that can can be used as (or considered to be) a convenience or an adjunct, but not the primary and/or only means to entering the date/time, then I will be fine? That is the part I am not clear on. I integrated the Dynarch widget into the onTap framework last year. Huh... Small world. I have a custom tag for the Dynarch widget that was hoping to leverage. Do you think that the Dynarch widget will be ok? Thanx G! On Fri, Feb 20, 2009 at 2:07 PM, s. isaac dealey i...@turnkey.to wrote: Also.. Does anyone know of any 508 compliant date/time pickers? Those are going to be the only JS widgets that may be an issue. Any date-picker should be fine, provided that the widget is used to populate a text field that can also be manually entered. I integrated the Dynarch widget into the onTap framework last year. -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 817.385.0301 http://onTap.riaforge.org/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319639 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: (sot) CF and Section 508 compliance a 508 compliant date/time picker
Any date-picker should be fine, provided that the widget is used to populate a text field that can also be manually entered. Thanx Ike, So if I understand correctly, if I have a date/time widgets that can can be used as (or considered to be) a convenience or an adjunct, but not the primary and/or only means to entering the date/time, then I will be fine? That is the part I am not clear on. Yep, as far as I know that's an accurate interpretation. Section 508 isn't a full moratorium on JavaScript -- it just means that you have to be careful to ensure that the JavaScript solutions are backed by working alternatives for people who can't use JS. So for that matter, the JS interface can even be the primary means, as long as it's not the only means. I've got a contact manager app that I'd been working on where a number of the links launch AJAX partial-page interfaces and this is fine because the link itself is just a normal link with an HREF to a working page where the person can perform the task, and all the JavaScript is done in the onclick. This way it's basically transparent to both the JS enabled average user as well as the screan-reader user. I integrated the Dynarch widget into the onTap framework last year. Huh... Small world. I have a custom tag for the Dynarch widget that was hoping to leverage. Do you think that the Dynarch widget will be ok? Yeah, it just populates a text field, so it should be fine. There's a wierd issue in the Spry date hints that collides with it (and apparently some other widgets as well). But as long as you're not using Spry that shouldn't be an issue. Good luck on the project. :) -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 817.385.0301 http://onTap.riaforge.org/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319646 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: (sot) CF and Section 508 compliance a 508 compliant date/time picker
I'm curious, what are the current torch and pitchfork arguments against using CFFORM? No reason for me to bring it up other than to avoid having the post derailed. I have seen it brought up a few times tends though not as bad as evaluate(). I have been using CF form for years with out a problem save mapping issues. If we have time we will roll our own, prolly using spry as long as it doesn't conflict with the Dynarch widget like said it could/would. G! On Fri, Feb 20, 2009 at 1:40 PM, Justin Scott jscott-li...@gravityfree.comwrote: Gerald Guido wrote: using CFForm will be an issue. Yes I know... we shouldn't use CFForm etc.. but it is uber-crunch time and that is what our code generator spits out. I'm curious, what are the current torch and pitchfork arguments against using CFFORM? In the past it was terrible and I still have nightmares about the code it generated, but it seems to be a lot more reasonable in the more recent versions of ColdFusion. I still couple it with server-side validation in case JavaScript isn't enabled, but I haven't found anything awful about it lately myself. -Justin ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319647 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: (sot) CF and Section 508 compliance a 508 compliant date/time picker
If we have time we will roll our own, prolly using spry as long as it doesn't conflict with the Dynarch widget like said it could/would. You can work around that by disabling Spry's date hints for date-validated text fields. -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 817.385.0301 http://onTap.riaforge.org/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319648 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: (sot) CF and Section 508 compliance a 508 compliant date/time picker
A good tutorial to start with would be http://jimthatcher.com/webcourse1.htm Basically, your site has to work with Javascript turned off. Check things by using just the keyboard, I've audited sites with date widgets where yes, the text could be entered manually, but the keyboard hit the date picker first and there was no way to tab out of it. Sandra Clark = http://www.shayna.com Training and Consulting in CSS and Accessibility Team Fusebox -Original Message- From: Gerald Guido [mailto:gerald.gu...@gmail.com] Sent: Friday, February 20, 2009 1:22 PM To: cf-talk Subject: (sot) CF and Section 508 compliance a 508 compliant date/time picker We just picked up a site that needs to be 508 compliant. I am getting a crash course right now. I (or any of us really) never made a site/app that needed to be 508 compliant. My only concern is the use of JS. It is basically a data entry and reporting app and there is going to be a TON of form fields. We plan to use JS for form validation (CFForm and/or other means if need be) and was wondering if using CFForm will be an issue. Yes I know... we shouldn't use CFForm etc.. but it is uber-crunch time and that is what our code generator spits out. Along the lines of validation, will we need server side validation as well? Also.. Does anyone know of any 508 compliant date/time pickers? Those are going to be the only JS widgets that may be an issue. And lastly, anyone care to pass on any general advice or gotchas and/or advice on that to be aware of and/or be careful of etc. As always, many TIA. G! -- Gerald Guido http://www.myinternetisbroken.com To invent, you need a good imagination and a pile of junk. -- Thomas A. Edison ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319649 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: (sot) CF and Section 508 compliance a 508 compliant date/time picker
I'd also recommend looking at the ARIA (accessible rich internet applications) initiative through the W3C: http://www.w3.org/WAI/PF/aria-practices/ You should also check out actual screen readers as modern screen readers do interact with javascript to some extent and that should be taken into account. There is a plugin for Firefox called Fire Vox (http://www.firevox.clcworld.net/) that I've heard about but haven't used. Hope that helps, Judah On Fri, Feb 20, 2009 at 4:43 PM, Sandra Clark slli...@shayna.com wrote: A good tutorial to start with would be http://jimthatcher.com/webcourse1.htm Basically, your site has to work with Javascript turned off. Check things by using just the keyboard, I've audited sites with date widgets where yes, the text could be entered manually, but the keyboard hit the date picker first and there was no way to tab out of it. Sandra Clark = http://www.shayna.com Training and Consulting in CSS and Accessibility Team Fusebox -Original Message- From: Gerald Guido [mailto:gerald.gu...@gmail.com] Sent: Friday, February 20, 2009 1:22 PM To: cf-talk Subject: (sot) CF and Section 508 compliance a 508 compliant date/time picker We just picked up a site that needs to be 508 compliant. I am getting a crash course right now. I (or any of us really) never made a site/app that needed to be 508 compliant. My only concern is the use of JS. It is basically a data entry and reporting app and there is going to be a TON of form fields. We plan to use JS for form validation (CFForm and/or other means if need be) and was wondering if using CFForm will be an issue. Yes I know... we shouldn't use CFForm etc.. but it is uber-crunch time and that is what our code generator spits out. Along the lines of validation, will we need server side validation as well? Also.. Does anyone know of any 508 compliant date/time pickers? Those are going to be the only JS widgets that may be an issue. And lastly, anyone care to pass on any general advice or gotchas and/or advice on that to be aware of and/or be careful of etc. As always, many TIA. G! -- Gerald Guido http://www.myinternetisbroken.com To invent, you need a good imagination and a pile of junk. -- Thomas A. Edison ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319652 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: T-SQL Date/Time
On 5/21/07, Mike Chabot [EMAIL PROTECTED] wrote: Perhaps CreateOdbcDate() is what you are after. I don't agree with this. CreateODBCDate() is only necessary if you're not using cfqueryparam The correct, safe and secure solution is to use cfqueryparam cfsqltype=cf_sql_date value=05/22/2007 or cfqueryparam cfsqltype=cf_sql_date value=#CreateDate(2007,05,22)# If the data type is actually a timestamp or datetime but you still want all times to be midnight... then use cfqueryparam cfsqltype=cf_sql_timestamp value=#CreateDateTime(2007,05,22,0,0,0)# Rick ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278847 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
T-SQL Date/Time
I'm converting a CF application from Oracle to MS SQL 2005 and found out that when you insert a date in to a datetime field in SQL, it creates a time (00:00:00) that includes either AM or PM according to when the record was inserted. What would be the best way to create a safe date to insert that will insure that the time is always the same, i.e. always 00:00:00:0 AM? PLEASE REPLY TO ME OFF LIST AT [EMAIL PROTECTED] AS I AM ON DIGEST AND DON'T HAVE TIME TO WADE THROUGH ALL THE MESSAGES. THANKS!!! ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278829 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: T-SQL Date/Time
I don't have an immediate answer to your question, but I was going to tell you that you can follow an individual thread directly from www.houseoffusion.com and even post replies from there without having to wade through the digest version. Here is the link to your thread: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:51779 ~Brad -Original Message- From: Rebecca Wells [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 7:06 PM To: CF-Talk Subject: T-SQL Date/Time PLEASE REPLY TO ME OFF LIST AT [EMAIL PROTECTED] AS I AM ON DIGEST AND DON'T HAVE TIME TO WADE THROUGH ALL THE MESSAGES. THANKS!!! ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278830 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: T-SQL Date/Time
Perhaps CreateOdbcDate() is what you are after. -Mike Chabot On 5/21/07, Rebecca Wells [EMAIL PROTECTED] wrote: I'm converting a CF application from Oracle to MS SQL 2005 and found out that when you insert a date in to a datetime field in SQL, it creates a time (00:00:00) that includes either AM or PM according to when the record was inserted. What would be the best way to create a safe date to insert that will insure that the time is always the same, i.e. always 00:00:00:0 AM? PLEASE REPLY TO ME OFF LIST AT [EMAIL PROTECTED] AS I AM ON DIGEST AND DON'T HAVE TIME TO WADE THROUGH ALL THE MESSAGES. THANKS!!! ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278831 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Invalid date/time on WS return
Hello, I am consuming a webservice and the call works fine. But I am getting an AxisFault that wont let me cfdump the return variable. The error looks like: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.NumberFormatException: Invalid date/time This happens anytime there is a Date/Time in the XML returned. Has anyone seen this before? Is there some way to pass through an XSLT to transform the return so Coldfusion can understand these variables? Below I've attached the XML that is returned.. I believe it is startDate that is causing the error... looks straight forward enough right? It's like CF cannot handle this variable. Thanks for looking, Carlos HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)/Tomcat-5.5 Content-Type: text/xml;charset=utf-8 Date: Tue, 27 Mar 2007 16:13:19 GMT Connection: close ?xml version=1.0 encoding=UTF-8? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body searchEntitlementResponse xmlns=urn:com.macrovison:flexnet/operations statusInfo statusSUCCESS/status /statusInfo entitlement simpleEntitlement entitlementId id1D0-A1C1-11DB-AEA3-B6A2CD07E6F2/id /entitlementId soldTo1036347096/soldTo stateTEST/state lineItems activationId id19888A10-A1C1-11DB-AEA3-AE4CDA634828/id /activationId product uniqueIdHID-100047/uniqueId primaryKeys nameAdvantage Access Point Upgrade/name version1.0/version /primaryKeys /product partNumber uniqueIdHID-92020/uniqueId primaryKeys partIdAPSW10100A/partId /primaryKeys /partNumber licenseModel uniqueIdHID-100010/uniqueId primaryKeys nameAdvantage License Algorithm License Model/name /primaryKeys /licenseModel licenseModelAttributes attribute attributeNameDevice_Type/attributeName stringValueAP/stringValue /attribute /licenseModelAttributes numberOfCopies4/numberOfCopies startDate2007-01-11/startDate isPermanenttrue/isPermanent numberOfRemainingCopies3/numberOfRemainingCopies isTrustedTypefalse/isTrustedType stateTEST/state /lineItems /simpleEntitlement /entitlement /searchEntitlementResponse /soapenv:Body /soapenv:Envelope ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273893 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
querying a date/time field
I want to compare dates in my Access database. It is setup as a date/time field in Access as expiration. I want to check whether the expiration date matches a cfset date. I tried every combination with or without quotes, single quotes, the = sign or EQ, but since I don't always do CF programming I'm stumped. The dates look like 00/00/ in the database. I get different errors such as: Syntax error (missing operator) in query expression 'expiration eq [03/04/2007]'. CFSET thirdletterdate = #DateAdd(d, -7, get.expiration)# CFSET sevendayemail = #DateFormat(thirdletterdate, mm-dd-yy)# cfquery name=Getnow datasource=trials Select * from trials_info where expiration eq #DateFormat(thirdletterdate, mm/dd/)# order by expiration desc /cfquery Thanks. RO HWW ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271867 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: querying a date/time field
I think comparing as an ODBC Datetime variable (using the CreateODBCDateTime() function) should work. That way you know you're comparing apples to apples. I've done that a few times when I have fits with different date formats. -Original Message- From: Orlini, Robert [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 07, 2007 10:13 AM To: CF-Talk Subject: querying a date/time field I want to compare dates in my Access database. It is setup as a date/time field in Access as expiration. I want to check whether the expiration date matches a cfset date. I tried every combination with or without quotes, single quotes, the = sign or EQ, but since I don't always do CF programming I'm stumped. The dates look like 00/00/ in the database. I get different errors such as: Syntax error (missing operator) in query expression 'expiration eq [03/04/2007]'. CFSET thirdletterdate = #DateAdd(d, -7, get.expiration)# CFSET sevendayemail = #DateFormat(thirdletterdate, mm-dd-yy)# cfquery name=Getnow datasource=trials Select * from trials_info where expiration eq #DateFormat(thirdletterdate, mm/dd/)# order by expiration desc /cfquery Thanks. RO HWW ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271868 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: querying a date/time field
ew access... try where expiration = cfqueryparam cfsqltype=cf_sql_date value=#fooDate# / On 3/7/07, Orlini, Robert [EMAIL PROTECTED] wrote: I want to compare dates in my Access database. It is setup as a date/time field in Access as expiration. I want to check whether the expiration date matches a cfset date. I tried every combination with or without quotes, single quotes, the = sign or EQ, but since I don't always do CF programming I'm stumped. The dates look like 00/00/ in the database. I get different errors such as: Syntax error (missing operator) in query expression 'expiration eq [03/04/2007]'. CFSET thirdletterdate = #DateAdd(d, -7, get.expiration)# CFSET sevendayemail = #DateFormat(thirdletterdate, mm-dd-yy)# cfquery name=Getnow datasource=trials Select * from trials_info where expiration eq #DateFormat(thirdletterdate, mm/dd/)# order by expiration desc /cfquery Thanks. RO HWW ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271869 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: querying a date/time field
ew access... This has nothing to do with Access. The problem is that formated dates should not be used in SQL, only CF date values (which are automatically converted t ODBCdates by default), or better use ODCDates. Secondly, quotes should nor be used with dates in SQL This should work: CFSET thirdletterdate = DateAdd(d, -7, get.expiration) cfquery name=Getnow datasource=trials Select * from trials_info where expiration eq #CreateODBCDate(thirdletterdate)# order by expiration desc /cfquery This should work, provided expiration has been entered using CreateDBCDate. If it was entered with a time value different from 00:00:00, the equality won't work. ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271914 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: querying a date/time field
it might not have anything to do with Access but doesn't mean I have to like Access.. On 3/7/07, Claude_Schnéegans [EMAIL PROTECTED] wrote: ew access... This has nothing to do with Access. The problem is that formated dates should not be used in SQL, only CF date values (which are automatically converted t ODBCdates by default), or better use ODCDates. Secondly, quotes should nor be used with dates in SQL This should work: CFSET thirdletterdate = DateAdd(d, -7, get.expiration) cfquery name=Getnow datasource=trials Select * from trials_info where expiration eq #CreateODBCDate(thirdletterdate)# order by expiration desc /cfquery This should work, provided expiration has been entered using CreateDBCDate. If it was entered with a time value different from 00:00:00, the equality won't work. ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271917 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: querying a date/time field
On 3/7/07, Claude_Schnéegans [EMAIL PROTECTED] wrote: CFSET thirdletterdate = DateAdd(d, -7, get.expiration) cfquery name=Getnow datasource=trials Select * from trials_info where expiration eq #CreateODBCDate(thirdletterdate)# order by expiration desc /cfquery This should work, provided expiration has been entered using CreateDBCDate. If it was entered with a time value different from 00:00:00, the equality won't work. Don't use createODBCDate()! cfquery name=Getnow datasource=trials Select * from trials_info where expiration = cfqueryparam cfsqltype=cf_sql_timestamp value=#thirdletterdate# order by expiration desc /cfquery (not also that eq is not a valid comparison operator in SQL ;) Rick ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271923 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Insert Current Date/Time into SQL DB (CF101)
I have been doing this wrong for years and getting by with it. What is the correct way? I have a field in my SQL Server 2005 PageHits table for the current date and time. What data format should the field be? What value do I pass from CF? CreateODBCDateTime(Now)) I get an error when I try that! What is the RIGHT way to do this with CF7??? ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267644 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Insert Current Date/Time into SQL DB (CF101)
CreateODBCDateTime(Now)) Does CreateODBCDataTime(Now()) work better? I use this all the time. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Soduko | | | - C code. C code run. Run code run. Please! - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267645 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Insert Current Date/Time into SQL DB (CF101)
If it is always going to contain the current date and time, just use getUTCDate() as the default value in the field. This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant, Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com -Original Message- From: Tim Claremont To: CF-Talk Sent: Thu Jan 25 16:33:15 2007 Subject: Insert Current Date/Time into SQL DB (CF101) I have been doing this wrong for years and getting by with it. What is the correct way? I have a field in my SQL Server 2005 PageHits table for the current date and time. What data format should the field be? What value do I pass from CF? CreateODBCDateTime(Now)) I get an error when I try that! What is the RIGHT way to do this with CF7??? ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267647 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Insert Current Date/Time into SQL DB (CF101)
On 1/25/07, Tim Claremont [EMAIL PROTECTED] wrote: I have been doing this wrong for years and getting by with it. What is the correct way? I have a field in my SQL Server 2005 PageHits table for the current date and time. What data format should the field be? What value do I pass from CF? CreateODBCDateTime(Now)) I get an error when I try that! why pass anything from CF? why not just make the default value of the field in the database getDate()? if you're updating...just pass getDate() (just like that. no quotes, no # signs (it's a SQL Server function, not a CF function)). no need to make CF do any thinking :) -- Charlie Griefer ...All the world shall be your enemy, Prince with a Thousand Enemies, and whenever they catch you, they will kill you. But first they must catch you, digger, listener, runner, prince with a swift warning. Be cunning and full of tricks and your people shall never be destroyed. ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267648 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Insert Current Date/Time into SQL DB (CF101)
Nope. My field's datatype is currently set to timestamp. I have a variable named HitTime set as follows: CFSET HitTime = #CreateODBCDateTime(Now())# Upon insert I get an Incorrect Syntax error on my page. ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267649 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Insert Current Date/Time into SQL DB (CF101)
CFSET HitTime = #CreateODBCDateTime(Now())# The Now() function returns an ODBC timestamp value, so there's no need to use CreateODBCDateTime with it. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267651 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Insert Current Date/Time into SQL DB (CF101)
I have been doing this wrong for years and getting by with it. What is the correct way? I have a field in my SQL Server 2005 PageHits table for the current date and time. What data format should the field be? What value do I pass from CF? CreateODBCDateTime(Now)) I get an error when I try that! What is the RIGHT way to do this with CF7??? In my opinion, in most situations, the best way is not to do it from CF at all. Simply define the default value within the database column. That way, if you write future applications in other environments that use the same database, they'll function identically. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267652 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Insert Current Date/Time into SQL DB (CF101)
As noted, probably bettere using getUTCDate, there is no need for ColdFusion to do the insertion. This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant, Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com -Original Message- From: Charlie Griefer To: CF-Talk Sent: Thu Jan 25 17:50:02 2007 Subject: Re: Insert Current Date/Time into SQL DB (CF101) On 1/25/07, Tim Claremont [EMAIL PROTECTED] wrote: I have been doing this wrong for years and getting by with it. What is the correct way? I have a field in my SQL Server 2005 PageHits table for the current date and time. What data format should the field be? What value do I pass from CF? CreateODBCDateTime(Now)) I get an error when I try that! why pass anything from CF? why not just make the default value of the field in the database getDate()? if you're updating...just pass getDate() (just like that. no quotes, no # signs (it's a SQL Server function, not a CF function)). no need to make CF do any thinking :) -- Charlie Griefer ...All the world shall be your enemy, Prince with a Thousand Enemies, and whenever they catch you, they will kill you. But first they must catch you, digger, listener, runner, prince with a swift warning. Be cunning and full of tricks and your people shall never be destroyed. ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267655 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Insert Current Date/Time into SQL DB (CF101)
I've not done much with i18n, so I'm not really familiar with the pros/cons of using getUTCDate() vs getDate(). Could you throw out a few bullet points? On 1/25/07, Robertson-Ravo, Neil (RX) [EMAIL PROTECTED] wrote: As noted, probably bettere using getUTCDate, there is no need for ColdFusion to do the insertion. -Original Message- From: Charlie Griefer To: CF-Talk Sent: Thu Jan 25 17:50:02 2007 Subject: Re: Insert Current Date/Time into SQL DB (CF101) On 1/25/07, Tim Claremont [EMAIL PROTECTED] wrote: I have been doing this wrong for years and getting by with it. What is the correct way? I have a field in my SQL Server 2005 PageHits table for the current date and time. What data format should the field be? What value do I pass from CF? CreateODBCDateTime(Now)) I get an error when I try that! why pass anything from CF? why not just make the default value of the field in the database getDate()? if you're updating...just pass getDate() (just like that. no quotes, no # signs (it's a SQL Server function, not a CF function)). no need to make CF do any thinking :) -- Charlie Griefer ...All the world shall be your enemy, Prince with a Thousand Enemies, and whenever they catch you, they will kill you. But first they must catch you, digger, listener, runner, prince with a swift warning. Be cunning and full of tricks and your people shall never be destroyed. ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267656 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Insert Current Date/Time into SQL DB (CF101)
I assume the SQL-Server datatype is datefime? Could you give an example of using getDate() in a sql update statement, please? Rick Colman why pass anything from CF? why not just make the default value of the field in the database getDate()? if you're updating...just pass getDate() (just like that. no quotes, no # signs (it's a SQL Server function, not a CF function)). no need to make CF do any thinking :) -- Charlie Griefer ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267657 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Insert Current Date/Time into SQL DB (CF101)
In my opinion, in most situations, the best way is not to do it from CF at all. Simply define the default value within the database column. That way, if you write future applications in other environments that use the same database, they'll function identically. Got it, Dave. Part of my problem was that I was not specifying the field names in my insert statement, thus it was trying to force a value into a field that was set to have a default value. I have not explicitly stated by values and destination fields (leaving the date out) and all is well. Man, the further away from Access I get, the worse it becomes... ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267658 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Insert Current Date/Time into SQL DB (CF101)
UPDATE myTable SET updatedTime = getDate() WHERE recordID = cfqueryparam name=#rID# cfsqltype=cf_sql_integer / On 1/25/07, Richard Colman [EMAIL PROTECTED] wrote: I assume the SQL-Server datatype is datefime? Could you give an example of using getDate() in a sql update statement, please? Rick Colman why pass anything from CF? why not just make the default value of the field in the database getDate()? if you're updating...just pass getDate() (just like that. no quotes, no # signs (it's a SQL Server function, not a CF function)). no need to make CF do any thinking :) -- Charlie Griefer ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267659 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Insert Current Date/Time into SQL DB (CF101)
Charlie Griefer wrote: I've not done much with i18n, so I'm not really familiar with the pros/cons of using getUTCDate() vs getDate(). Could you throw out a few bullet points? using UTC datetimes isn't really i18n. it's used if you need UTC timezone (tz) data (like maybe you live in greenwich, GB) or more often when you need to support different tz in the same application. you cast all your whatever tz datetimes to UTC when you insert them into your database. that makes converting them to other tz simpler. of course this is all moot if your server's tz uses DST you rely on cf's datetimes, all datetimes are server datetimes as far as cf is concerned. ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267666 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Insert Current Date/Time into SQL DB (CF101)
On 1/25/07, Paul Hastings [EMAIL PROTECTED] wrote: Charlie Griefer wrote: I've not done much with i18n, so I'm not really familiar with the pros/cons of using getUTCDate() vs getDate(). Could you throw out a few bullet points? using UTC datetimes isn't really i18n. it's used if you need UTC timezone (tz) data (like maybe you live in greenwich, GB) or more often when you need to support different tz in the same application. you cast all your whatever tz datetimes to UTC when you insert them into your database. that makes converting them to other tz simpler. of course this is all moot if your server's tz uses DST you rely on cf's datetimes, all datetimes are server datetimes as far as cf is concerned. Ah, got it. Thanks, Paul :) -- Charlie Griefer ...All the world shall be your enemy, Prince with a Thousand Enemies, and whenever they catch you, they will kill you. But first they must catch you, digger, listener, runner, prince with a swift warning. Be cunning and full of tricks and your people shall never be destroyed. ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267673 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Identifying date/time objects
I have a page which allows the user to select a custom query and download a CSV. The relevant code is: cfsetting enablecfoutputonly=yes CFHEADER NAME=Content-Disposition VALUE=attachment; filename=#session.MM_Username##LSTimeFormat(Now(),'hhmmmss')#.csv CFCONTENT TYPE=application/excel cfoutput#fieldlist##chr(13)#/cfoutput cfoutput query=rsList cfloop index=thisfield list=#fieldlist# cfset newfield=#rereplace(evaluate(#thisfield#), #chr(13)##chr(10)#, #chr(10)#, all)##trim(rereplace(#newfield#, ,, , all))#, /cfloop#CHR(13)# /cfoutput I want to be able to figure out if #thisfield# is a SQL date/time object so I can output it as mm/dd/ instead of 2006-02-11 00:00:00.0 For some reason some of my users get this and excel interprets the date field as 00:00:00.0 instead of the date, unless you go in and manually change the format. Any ideas? ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261395 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Identifying date/time objects
cfif IsDate(thisfield) #DateFormat(blahblah)# cfelse whatever /cfif Would that work? Will ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261396 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Identifying date/time objects
Or maybe you'd needta extract that date out first with a ListFirst()? cfset dateOnly = ListFirst(thisfield, ) cfif isValid(dateOnly) Show this cfelse show that /cfif ?? Will ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261397 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Identifying date/time objects
I just slapped myself on my forehead, thank you. This worked fine: cfoutput query=rsList cfloop index=thisfield list=#fieldlist# cfif IsDate(evaluate(#thisfield#)) #lsdateformat(evaluate(#thisfield#), mm/dd/)# cfelse #evaluate(#thisfield#)# /cfif, /cfloop#CHR(13)# /cfoutput On 11/22/06 8:31 AM, Will Tomlinson [EMAIL PROTECTED] wrote: cfif IsDate(thisfield) #DateFormat(blahblah)# cfelse whatever /cfif Would that work? Will ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261401 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Identifying date/time objects
Will, It looks like isDate() will do what you need - to see if the string can be converted to a date You might want to look at parseDateTime() which will create a date object from the date string.. may or may not be of any use cfset test = 2006-02-11 00:00:00.0 cfoutput#parseDateTime(test)# | #isDate(test)# | #dateformat(parseDateTime(test), dd/mmm/)#/cfoutput Regards Rich On 11/22/06, Charles Sheehan-MIles [EMAIL PROTECTED] wrote: I just slapped myself on my forehead, thank you. This worked fine: cfoutput query=rsList cfloop index=thisfield list=#fieldlist# cfif IsDate(evaluate(#thisfield#)) #lsdateformat(evaluate(#thisfield#), mm/dd/)# cfelse #evaluate(#thisfield#)# /cfif, /cfloop#CHR(13)# /cfoutput On 11/22/06 8:31 AM, Will Tomlinson [EMAIL PROTECTED] wrote: cfif IsDate(thisfield) #DateFormat(blahblah)# cfelse whatever /cfif Would that work? Will ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261404 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
i18n date/time
Hi, I have a question on i18n date and time display for local time zones. Currently I have had all date and time stored and presented in the server/local time zone, but I am interested in moving to storing all that in UTC format, and displaying it in local time for what the client/user prefers. I can use DateConvert to get server/local times to and from UTC, but what would I use to localize the time for presentation for any existing time zones... ? /Hugo -- Hugo Ahlenius - Hugo Ahlenius E-Mail: [EMAIL PROTECTED] Project OfficerPhone: +46 8 412 1427 UNEP GRID-Arendal Fax:+46 8 723 0348 Stockholm Office Mobile: +46 733 467111 WWW: http://www.grida.no Skype:callto:fraxxinus - ###This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.Formore information, connect to http://www.F-Secure.com/ ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:245644 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4; //Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: i18n date/time
Oh, Now I saw Paul H's post on his blog, so it seems like there is no easy way to do this... http://cfg11n.blogspot.com/2006/05/there-is-such-thing-as-timezone-hell ..html -- Hugo Ahlenius - Hugo Ahlenius E-Mail: [EMAIL PROTECTED] Project OfficerPhone: +46 8 412 1427 UNEP GRID-Arendal Fax:+46 8 723 0348 Stockholm Office Mobile: +46 733 467111 WWW: http://www.grida.no Skype:callto:fraxxinus - | -Original Message- | From: Hugo Ahlenius [mailto:[EMAIL PROTECTED] | Sent: Friday, July 07, 2006 09:52 | To: CF-Talk | Subject: i18n date/time | | Hi, | | I have a question on i18n date and time display for local time zones. | Currently I have had all date and time stored and presented in the | server/local time zone, but I am interested in moving to storing all | that in UTC format, and displaying it in local time for what the | client/user prefers. | | I can use DateConvert to get server/local times to and from UTC, but | what would I use to localize the time for presentation for any | existing time zones... ? | | /Hugo | | | -- | Hugo Ahlenius | | - | Hugo Ahlenius E-Mail: [EMAIL PROTECTED] | Project OfficerPhone: +46 8 412 1427 | UNEP GRID-Arendal Fax:+46 8 723 0348 | Stockholm Office Mobile: +46 733 467111 |WWW: http://www.grida.no |Skype:callto:fraxxinus | - | | | | | | | | | ###This message has been | scanned by F-Secure Anti-Virus for Microsoft Exchange.Formore | information, connect to http://www.F-Secure.com/ | | | ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:245645 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4; //Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: i18n date/time
Hugo Ahlenius wrote: Now I saw Paul H's post on his blog, so it seems like there is no easy way to do this... well actually there is. set you server tz to UTC bob's your uncle. if nopt the only other way to avoid the DST boundary issue is to use java epoch offsets. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:245663 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: i18n date/time
| well actually there is. set you server tz to UTC bob's your uncle. | if nopt the only other way to avoid the DST boundary issue is to use | java epoch offsets. Sorry Paul - but how does that help? You mean by just adding and subtracting for the timezone manually? And why does the server tz need to be UTC -- wouldn't it be enough to just handle all time in UTC in the backend? So I am not sure if Bob is my uncle. Otherwise, here is a little snippet I got from the bluedragon mailing list (which is a friendly place, btw). I just spotted now that the function may need to be cleaned up and made threadsafe, so handle with care... cfscript function formatDate( date, timezone ){ timezone = createObject( java, java.util.TimeZone ).getTimeZone( timezone ); sdf = createObject( java, java.text.SimpleDateFormat ).init( yy/MM/dd HH:mm:ss zzz ); sdf.setTimeZone( timezone ); return sdf.format( date ); } /cfscript cfoutput #formatDate( now(), PST )#br /cfoutput ###This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.Formore information, connect to http://www.F-Secure.com/ ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:245668 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: i18n date/time
Hugo Ahlenius wrote: Sorry Paul - but how does that help? You mean by just adding and subtracting for the timezone manually? And why does the server tz need you're missing the real issue. to be UTC -- wouldn't it be enough to just handle all time in UTC in the backend? So I am not sure if Bob is my uncle. cf doesn't know a tz from a hole in the ground--it does not know your datetimes are UTC. it assumes all datetimes are server tz. if the server's tz has DST, all DST boundary dates get swapped *before* you can do anything to cast them to another tz (including UTC w/dateConvert). for example, 2006-04-02 02:01:00.0 will *never* exist on a server that follows US DST. it will *always* get swapped over to 2006-04-02 03:01:00.0. this is particularly nasty if you host in the US but need say australian tz, because that missing hour is about in the middle of their day there. if the server's in UTC tz, which will never have DST, this magical swap over doesn't occur, so you can happily cast from one tz to another. either that or use java epoch offset change all kinds of stuff. Otherwise, here is a little snippet I got from the bluedragon mailing yes, old school i18n stuff. but it doesn't address the real issue. btw that approach will bite your rear end eventually w/that custom date formatting. i strongly urge you to stick w/the standard java formatting styles (FULL--SHORT). you'll end up in trouble if you ever have to parse those localized strings back to datetimes. not sure if matt's opened the CVS for public consumption but you might look at the boardfusion's project's i18nutils.cfc. it addresses this by using java epoch offsets (via icu4j) or the machII blog project (not sure if he's incorporated the new stuff yet) which has something similar but uses core java (which is doubly more convoluted for stuff like this than icu4j). ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:245677 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: local date time minus 17 hours
I fired up Ben's tag last week from his recent blog entry on it. Very slick, although NIST servers report GMT. You'll need DateAdd() for your timezone calc. If you are on a shared server that function is the way to go. If you are on a dedicated box I would use the free NIST exe and schedule it so the server clock itself stays within a second or less of perfect time. Works like a charm. -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226803 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: [Reply To] Re: FW: local date time minus 17 hours
Maybe this will help too. It just came in this morning. getNISTTime Created by: Ben Forta ([EMAIL PROTECTED]) CF Version: ColdFusion MX Obtains current time data from NIST Internet Time Service servers. http://www.cflib.org/udf.cfm?id=1377 ..:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.13.13/197 - Release Date: 12/9/2005 ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226751 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: local date time minus 17 hours
I have the same problem (hosting in the US) and I use Paul Hastings' -Original Message- From: Seamus Campbell [mailto:[EMAIL PROTECTED] Sent: Sunday, 11 December 2005 4:16 p.m. To: CF-Talk Subject: local date time minus 17 hours How do I get my local date and time when my ISP's local time is 17 hours behind me. Many thanks Seamus Seamus Campbell Boldacious WebDesign http://www.boldacious.com [EMAIL PROTECTED] ph 02 6297 4883 mob 0410 609 267 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226752 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: local date time minus 17 hours
Whoops! I have the same problem (hosting in the US) and I use Paul Hastings' timezone CFC (http://www.sustainablegis.com/projects/tz/testTZCFC.cfm) in application.cfc, then just refer to request.now instead of now() cfset request.now = application.environment.tz.castFromServer(now(), application.environment.timeZone) -Original Message- From: Matthew Walker Sent: Monday, 12 December 2005 12:01 p.m. To: 'cf-talk@houseoffusion.com' Subject: RE: local date time minus 17 hours I have the same problem (hosting in the US) and I use Paul Hastings' -Original Message- From: Seamus Campbell [mailto:[EMAIL PROTECTED] Sent: Sunday, 11 December 2005 4:16 p.m. To: CF-Talk Subject: local date time minus 17 hours How do I get my local date and time when my ISP's local time is 17 hours behind me. Many thanks Seamus Seamus Campbell Boldacious WebDesign http://www.boldacious.com [EMAIL PROTECTED] ph 02 6297 4883 mob 0410 609 267 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226753 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: local date time minus 17 hours
Thanks Matthew. I didnt know about that CFC. It does the same job I do, changing for daylight savings etc, only it does it automatically, and i think it's quite a bit more elegant than my way of doing it. I'm going to change over to using this cfc as I work on my sites. Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 12/12/05, Matthew Walker [EMAIL PROTECTED] wrote: Whoops! I have the same problem (hosting in the US) and I use Paul Hastings' timezone CFC (http://www.sustainablegis.com/projects/tz/testTZCFC.cfm) in application.cfc, then just refer to request.now instead of now() cfset request.now = application.environment.tz.castFromServer(now(), application.environment.timeZone) ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226760 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
local date time minus 17 hours
How do I get my local date and time when my ISP's local time is 17 hours behind me. Many thanks Seamus Seamus Campbell Boldacious WebDesign http://www.boldacious.com [EMAIL PROTECTED] ph 02 6297 4883 mob 0410 609 267 ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226742 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
FW: local date time minus 17 hours
How do I get my local date and time when my ISP's local time is 17 hours behind me. DateAdd(h, 17, Now()) Paul ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226743 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: local date time minus 17 hours
Get an ISP closer to you ;-) dateadd(h, 17, now()) ..:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Seamus Campbell [mailto:[EMAIL PROTECTED] Sent: Saturday, December 10, 2005 10:01 PM To: CF-Talk Subject: local date time minus 17 hours How do I get my local date and time when my ISP's local time is 17 hours behind me. Many thanks Seamus Seamus Campbell Boldacious WebDesign http://www.boldacious.com [EMAIL PROTECTED] ph 02 6297 4883 mob 0410 609 267 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226744 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: local date time minus 17 hours
Quotes around h... sorry dateadd('h', 17, now()) ..:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Saturday, December 10, 2005 10:37 PM To: CF-Talk Subject: RE: local date time minus 17 hours Get an ISP closer to you ;-) dateadd(h, 17, now()) ...:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Seamus Campbell [mailto:[EMAIL PROTECTED] Sent: Saturday, December 10, 2005 10:01 PM To: CF-Talk Subject: local date time minus 17 hours How do I get my local date and time when my ISP's local time is 17 hours behind me. Many thanks Seamus Seamus Campbell Boldacious WebDesign http://www.boldacious.com [EMAIL PROTECTED] ph 02 6297 4883 mob 0410 609 267 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226745 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: FW: local date time minus 17 hours
Seamus I have this issue too, hosting some of my sites in teh Midwest of the USA, when I'm in Australia. So i have an application variable called application.austime which I set in the Application.cfc file on all my sites. Depending on where they are located in the world, application.austime might be set as #now()# or #now()# + #createTimeSpan(0,16,0,0)# or whatever time difference is appropriate depending on the relative status of daylight savings. Then instead of using #now()# in any of my apps, I can use #application.austime# and when I upload the files to the server, the time values will stlil be correct. And Yes, I know I could use Locale, but I developed this method of handling it before I learned about locale. Anyway, Australian daylight savings change dates differ from year to year as the politicians get it into their heads to change things. I'm not at all confident that the folks at Adobe or Microsoft will keep abreast of our daylight savings debates and many changes. (for example the NSW government brought forward the change to summer time by 8 weeks prior to the 2000 Olympics to suit NBC's prime time schedule). Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 12/11/05, Paul Vernon [EMAIL PROTECTED] wrote: How do I get my local date and time when my ISP's local time is 17 hours behind me. DateAdd(h, 17, Now()) Paul ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226746 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
[Reply To] Re: FW: local date time minus 17 hours
Thanks Mike I've tried that but I get a number ( eg 38698.3354861) I'm using CFMX 7 Do you know why I'm getting this? Exact code I'm using: cfset application.austime= #now()# + #createTimeSpan(0,17,0,0)# cfoutput#application.austime#/cfoutput Ta Seamus You wrote Seamus I have this issue too, hosting some of my sites in teh Midwest of the USA, when I'm in Australia. So i have an application variable called application.austime which I set in the Application.cfc file on all my sites. Depending on where they are located in the world, application.austime might be set as #now()# or #now()# + #createTimeSpan(0,16,0,0)# or whatever time difference is appropriate depending on the relative status of daylight savings. Then instead of using #now()# in any of my apps, I can use #application.austime# and when I upload the files to the server, the time values will stlil be correct. And Yes, I know I could use Locale, but I developed this method of handling it before I learned about locale. Anyway, Australian daylight savings change dates differ from year to year as the politicians get it into their heads to change things. I'm not at all confident that the folks at Adobe or Microsoft will keep abreast of our daylight savings debates and many changes. (for example the NSW government brought forward the change to summer time by 8 weeks prior to the 2000 Olympics to suit NBC's prime time schedule). Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 12/11/05, Paul Vernon [EMAIL PROTECTED] wrote: How do I get my local date and time when my ISP's local time is 17 hours behind me. DateAdd(h, 17, Now()) Paul ~~ ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226747 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: FW: local date time minus 17 hours
Mike Kear wrote: And Yes, I know I could use Locale, but I developed this method of handling locale has nothing to do w/timezone (tz) or DST. it before I learned about locale. Anyway, Australian daylight savings change dates differ from year to year as the politicians get it into their actually it doesn't change all that often. if you look at the olsen tz data, there aren't all that many historical tz compared to regional/national ones (but there are enough to worry some folks). heads to change things. I'm not at all confident that the folks at Adobe or Microsoft will keep abreast of our daylight savings debates and many neither is responsible for cf's tz data. that comes from the olsen db is found within the JVM. sun usually stays on top of these sort of things. changes. (for example the NSW government brought forward the change to summer time by 8 weeks prior to the 2000 Olympics to suit NBC's prime time schedule). just curious, was that DST change made across all of australia? was it found in the olsen data for the JVM version for that time period? if so did it get a special name? did the changes stick? ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226748 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: [Reply To] Re: FW: local date time minus 17 hours
Try to Time/Dateformat() it and see if its what your looking for I'd still use this though... cfset application.austime = dateadd('h', 17, now()) ..:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Seamus Campbell [mailto:[EMAIL PROTECTED] Sent: Saturday, December 10, 2005 11:05 PM To: CF-Talk Subject: [Reply To] Re: FW: local date time minus 17 hours Thanks Mike I've tried that but I get a number ( eg 38698.3354861) I'm using CFMX 7 Do you know why I'm getting this? Exact code I'm using: cfset application.austime= #now()# + #createTimeSpan(0,17,0,0)# cfoutput#application.austime#/cfoutput Ta Seamus -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.13.13/197 - Release Date: 12/9/2005 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226749 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [Reply To] Re: FW: local date time minus 17 hours
Bobby's dateadd function does the same thing as my function, but more concisely and better I think. The politicians are talking about changing the daylight savings changes yet again. It comes up in the public debate every time there is a change either to or from summer time. Queensland, in the tropics, and therefore not really needing daylight savings doesnt change. Every time we change the clocks people here say 'Queensland is so conservaitve and ought to change with the rest of us, yet no one ever seems to notice that the closer you get to the equator, the less is the difference between June sunset and January sunset times. So whenever this comes up, there's debate about how backward Queenslanders are (they arent - they just dont need daylight savings), and then someone will say we ought to have daylight savings all around the year, and someone else will say we ought to change two months earlier, and round it all goes again. I do believe that Victoria will be changing at a different time next year because they have the Commonwealth Games on in Melbourne, but Im not sure about that. The change to the dates here in 2000 were only in NSW, I think, although Victoria might have joined us, not sure. It's all very confused here and I just prefer to keep it under my own control. When the clocks change in the house here, I change my Application.cfc files and all my sites stay at the right time. Seamus, you need to use dateformat. e.g. #dateformat(application.austime, d/mmm/)# Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 12/11/05, Bobby Hartsfield [EMAIL PROTECTED] wrote: Try to Time/Dateformat() it and see if its what your looking for I'd still use this though... cfset application.austime = dateadd('h', 17, now()) ..:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Seamus Campbell [mailto:[EMAIL PROTECTED] Sent: Saturday, December 10, 2005 11:05 PM To: CF-Talk Subject: [Reply To] Re: FW: local date time minus 17 hours Thanks Mike I've tried that but I get a number ( eg 38698.3354861) I'm using CFMX 7 Do you know why I'm getting this? Exact code I'm using: cfset application.austime= #now()# + #createTimeSpan(0,17,0,0)# cfoutput#application.austime#/cfoutput Ta Seamus -- ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226750 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
European date/time/currency formats CF5
I am implementing a multi-lingual application. Admin users will have the possibility to switch between languages and formats instantly. These are my issues: 1. finding a javascript (pop up calendar to select date to insert into field) that allows both formats mm/dd/ and dd.mm.. My current javascript does not support european formats, hence generating error when processing form 2. same for timeformats. any ideas? 3. How to process insert and update statements considering that the display will be in different formats while SQL 2000 requests mm/dd/ 4. EUR currency display ( I am using decimal as column format in SLQ) What other issues may I encounter? Any help is appreciated. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212337 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: European date/time/currency formats CF5
3. How to process insert and update statements considering that the display will be in different formats while SQL 2000 requests mm/dd/ I have no answer for the othe points, but for this one, the answer is that you should convert the date to ODBCFormat. See CF_convertDate here: http://www.contentbox.com/claude/customtags/convertDate/viewConvertDate.cfm?p=hf -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212341 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: European date/time/currency formats CF5
Michael Kettenring Personal wrote: 1. finding a javascript (pop up calendar to select date to insert into http://www.dynarch.com/projects/calendar/ 2. same for timeformats. any ideas? ?? 3. How to process insert and update statements considering that the display will be in different formats while SQL 2000 requests mm/dd/ sql server does what it's told. use SET DATEFORMAT mdy (or whatever) to get it to handle your date formats. 4. EUR currency display ( I am using decimal as column format in SLQ) well here's where you might have an issue w/cf5 which defaults to iso-8859-1 which doesn't cover the euro. use the LSCurrencyFormat (probably won't work w/cf5 as it's pre-euro adoption) or LSEuroCurrencyFormat. What other issues may I encounter? lots but to simplify things i'd try to upgrade to cf7, it's a way way better platform for i18n work than cf5 ever was. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212343 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Date/Time Question
I thought I posted this question yesterday but it doesn't seem that it ever was posted. The question is how to convert this date/time field that I receive in a webservice to a standard date/time. The value I pull is in this format: 2005-04-07T13:29:00.000-04:00 You cannot use the DateFormat in ColdFusion on it without getting an error saying it is not a valid dateformat. I need to be able to store it to SQL server but when I try it as is I get an error about Incorrect syntax near apos;T13:apos;. Any help would be much appreciated. Thanks in advance, Jim ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206606 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Date/Time Question
Jim Rathmann wrote: I thought I posted this question yesterday but it doesn't seem that it ever was posted. The question is how to convert this date/time field that I receive in a webservice to a standard date/time. The value I pull is in this format: 2005-04-07T13:29:00.000-04:00 You cannot use the DateFormat in ColdFusion on it without getting an error saying it is not a valid dateformat. CF doesn't recognize ISO formatted dates, that is a long standing enhancement request: http://www.macromedia.com/go/wish/ With simply dropping sub-second precision and the timezone info: cfdate = ListFirst(Replace(theDate,T, ),.) Jochem ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206609 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Date/Time Question
JR The value I pull is in this format: JR 2005-04-07T13:29:00.000-04:00 Truncate the string to a dot(.) and replace T to a space 2005-04-07 13:29:00 is a correct date format for most SQL servers. JR I need to be JR able to store it to SQL server but when I try it as is I get an JR error about Incorrect syntax near apos;T13:apos;. Sergeymailto:[EMAIL PROTECTED] ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206613 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Date/Time Question
Did you try any of the Parse Date/Time functions? If that doesn't work, you can always build a function to parse the date/time for you. This format looks like it should be consistent for all dates/times. M!ke -Original Message- From: Jim Rathmann [mailto:[EMAIL PROTECTED] Sent: Friday, May 13, 2005 11:37 AM To: CF-Talk Subject: Date/Time Question I thought I posted this question yesterday but it doesn't seem that it ever was posted. The question is how to convert this date/time field that I receive in a webservice to a standard date/time. The value I pull is in this format: 2005-04-07T13:29:00.000-04:00 You cannot use the DateFormat in ColdFusion on it without getting an error saying it is not a valid dateformat. I need to be able to store it to SQL server but when I try it as is I get an error about Incorrect syntax near apos;T13:apos;. Any help would be much appreciated. Thanks in advance, Jim ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206617 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Convert Milliseconds to Date/Time
I have a question that I am not sure if ColdFusion can calculate. Is there any way to convert a Date/Time field that is in Milliseconds to a readable Date/Time using ColdFusion? You can do it using the following JavaScript: var theDateObj = new Date(parseFloat(110838972)); var d = theDateObj.toLocaleString(); and the result is: Monday, February 14, 2005 9:02:00 AM I don't want to convert it with JS I would like to try it with CF. If anyone could help it would be much appreciated thanks. Thanks, Jim ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204759 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Convert Milliseconds to Date/Time
Jim...milliseconds are not a date...just a measure of time. Now if you have a start date and are adding milliseconds to that date...then you're making sense ;-) Let us know what the situation is Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204764 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Convert Milliseconds to Date/Time
If you're on CF7, give this a whirl: #createObject(java, java.util.Date).init(javaCast(long, 110838972))# On CF6.1 it doesn't work, because CF insists on using an int for the value, which it overflows. CF7 might be different. cheers, barneyb On 4/27/05, Jim Rathmann [EMAIL PROTECTED] wrote: I have a question that I am not sure if ColdFusion can calculate. Is there any way to convert a Date/Time field that is in Milliseconds to a readable Date/Time using ColdFusion? You can do it using the following JavaScript: var theDateObj = new Date(parseFloat(110838972)); var d = theDateObj.toLocaleString(); and the result is: Monday, February 14, 2005 9:02:00 AM I don't want to convert it with JS I would like to try it with CF. If anyone could help it would be much appreciated thanks. Thanks, Jim -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204766 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Convert Milliseconds to Date/Time
Prolly epoch time, seconds since jan 1 1970? and sure, you can do that. cfset myNewDate = dateAdd('s',millisecondsValueHere,'01/01/1970 00:00:00.000') tw On 4/27/05, Bryan Stevenson [EMAIL PROTECTED] wrote: Jim...milliseconds are not a date...just a measure of time. Now if you have a start date and are adding milliseconds to that date...then you're making sense ;-) Let us know what the situation is Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204769 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Convert Milliseconds to Date/Time
Look at the date and time functions. They now support milliseconds. You need to know, in your system, what 0 milliseconds is equal to. It may be Jan 1, 1970. That will give you a datum from which you can caculate your dates. I don't have access to a server right now, or I would try it myself. M!ke -Original Message- From: Jim Rathmann [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 12:22 PM To: CF-Talk Subject: Convert Milliseconds to Date/Time I have a question that I am not sure if ColdFusion can calculate. Is there any way to convert a Date/Time field that is in Milliseconds to a readable Date/Time using ColdFusion? You can do it using the following JavaScript: var theDateObj = new Date(parseFloat(110838972)); var d = theDateObj.toLocaleString(); and the result is: Monday, February 14, 2005 9:02:00 AM I don't want to convert it with JS I would like to try it with CF. If anyone could help it would be much appreciated thanks. Thanks, Jim ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204775 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Convert Milliseconds to Date/Time
Jim...milliseconds are not a date...just a measure of time. Actually, it's common to use a number as a date, based on some starting time. For example, Unix date values use the number of seconds since 1 January 1970. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204777 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Convert Milliseconds to Date/Time
nada barney Could not convert the value 1.10838972E12 to an integer because it cannot fit inside an integer. On 4/27/05, Barney Boisvert [EMAIL PROTECTED] wrote: If you're on CF7, give this a whirl: #createObject(java, java.util.Date).init(javaCast(long, 110838972))# On CF6.1 it doesn't work, because CF insists on using an int for the value, which it overflows. CF7 might be different. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204790 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Convert Milliseconds to Date/Time
if you use Tony's make sure you multiply your milliseconds by 1000 to get to seconds. On 4/27/05, Tony Weeg [EMAIL PROTECTED] wrote: Prolly epoch time, seconds since jan 1 1970? and sure, you can do that. cfset myNewDate = dateAdd('s',millisecondsValueHere,'01/01/1970 00:00:00.000') tw On 4/27/05, Bryan Stevenson [EMAIL PROTECTED] wrote: Jim...milliseconds are not a date...just a measure of time. Now if you have a start date and are adding milliseconds to that date...then you're making sense ;-) Let us know what the situation is Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204785 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Convert Milliseconds to Date/Time
Thanks for the help everyone it does seem as though it is epoch time. I have never heard of that, but it does start on Jan 1, 1970 0:00:00. Thanks again, jim ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204807 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Convert Milliseconds to Date/Time
Greg Morphis wrote: if you use Tony's make sure you multiply your milliseconds by 1000 to get to seconds. I would love to have you as a customer and bill you using that math, but my customers only accept it when I devide by 1000. Jochem ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204815 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Easiest way to convert a string to a date/time object?
What is the easiest way to convert the following string into a valid date/time object? So as not to get the following error. 2005-01-31T06:00:00-08:00 is an invalid date format. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192475 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Easiest way to convert a string to a date/time object?
Turn the T into a space. -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Monday, January 31, 2005 5:42 PM To: CF-Talk Subject: Easiest way to convert a string to a date/time object? What is the easiest way to convert the following string into a valid date/time object? So as not to get the following error. 2005-01-31T06:00:00-08:00 is an invalid date format. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192476 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Easiest way to convert a string to a date/time object?
CreateDateTime() Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com - Original Message - From: Ian Skinner [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, January 31, 2005 2:41 PM Subject: Easiest way to convert a string to a date/time object? What is the easiest way to convert the following string into a valid date/time object? So as not to get the following error. 2005-01-31T06:00:00-08:00 is an invalid date format. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192477 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Easiest way to convert a string to a date/time object?
Ian Skinner wrote: What is the easiest way to convert the following string into a valid date/time object? So as not to get the following error. 2005-01-31T06:00:00-08:00 is an invalid date format. The easiest way is http://www.macromedia.com/go/wish/ and mention that you want to vote for issue 49751 :-) Jochem ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192479 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Easiest way to convert a string to a date/time object?
Where do you all find these issues and/or whishes enumerated on the Macromedia site? I have often wondered if some of the issues I run into are already reported or not. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning ...-Original Message- ...From: Jochem van Dieten [mailto:[EMAIL PROTECTED] ...Sent: Monday, January 31, 2005 3:04 PM ...To: CF-Talk ...Subject: Re: Easiest way to convert a string to a date/time object? ... ...Ian Skinner wrote: ... What is the easiest way to convert the following string into a valid ...date/time object? So as not to get the following error. ... ... 2005-01-31T06:00:00-08:00 is an invalid date format. ... ...The easiest way is http://www.macromedia.com/go/wish/ and mention ...that you want to vote for issue 49751 :-) ... ...Jochem ... ... ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192482 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Easiest way to convert a string to a date/time object?
Ian Skinner wrote: Where do you all find these issues and/or whishes enumerated on the Macromedia site? Nowhere. The only numbers I know are the ones I submitted myself and have received feedback on (which isn't always). Jochem ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192484 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
OT SQL date/time default
I have a form that if the date field is blank SQL automatically inserts the date of 1/1/1900 and then this displays. How can I have it leave this field blank? The column is set as datetime in design view. Thx. Robert O. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191957 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54