Copy link to clipboard
Copied
Hi all,
I'm having a bit of a problem with cfExchangeTask in regards to null dates (yes, i know cf doesn't actually support null)
I want to set the due date of my task to null, however, when i send [empty string] to cfexchange, it throws a "not a date" exception!
if i don't pass the dueDate value when I edit my task, then obviously, the due date doesn't get updated.
Has anybody come up with any trickery to pass a due date to null it on the server?
as it stands i'm having to delete then recreate tasks without the due date (to set those null values!)
not happy jan
Copy link to clipboard
Copied
I have used the following to try and experiment with null values, but neither seemed to work
<cfquery name="foo" datasource="#application.datasource#"> <!--- sql server 2005 --->
select null as bar
</cfquery>
<cfdump var="#foo.bar#">
<cffunction name="GetNull" returntype="any">
<cfreturn />
</cffunction>
<cfset foo = getNull()>
<cfdump var="#isdefined('foo')#">
the first of course, throws on the date check in cfExchangeTask and the second causes nothing to get changed on the updated task as the value is undefined
Copy link to clipboard
Copied
same result as null values from java
<cfset foo = CreateObject("java", "java.util.Vector")>
<cfset foo.setSize(1)>
<cfset bar = foo.get(0)> <!--- returns null --->
<cfdump var="#isdefined('bar')#" />
undefined...
Copy link to clipboard
Copied
You might submit a comment on the livedocs page. Obviously it is not the place for coding help 😉 But, I think it would be appropriate to ask if null dates are supported. Since it does not seem to be mentioned in the documentation - one way or the other.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_d-e_17.html
Copy link to clipboard
Copied
good idea! thanks.
I've submitted a comment.
in the meantime, does anybody happen to have any in depth knowledge about how getDate() works, perhaps that could evidence some possiblities.