Skip to main content

Hello,


I am receiving the following error during my workflow. I have searched the message board for the error text and didn't get any hits, so hopefully somebody out there knows what I'm doing wrong.


Error: Invalid date/time value A date/time field contains invalid data. Please check the value and try again.


Scenario: Workflow is running a SharePoint Document event to update document metadata. The data being updated is ExpirationDate (DateTime - not required). The step only errors when I try to send in a blank value (the user cleared the date and submitted). The XML can look one of 2 ways, but they both error:


<ExpirationDate Title="ExpirationDate" Name="ExpirationDate" xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></ExpirationDate> -


<ExpirationDate Title="ExpirationDate" Name="ExpirationDate"></ExpirationDate>


Is there a way to send blank/null date values to a SharePoint event? Any help would be greatly appreciated. Thanks in advance,


-dk

I think you might have hit a known issue. Please log a K2 Support ticket for this. I think if you look at the process XML in the report you should see the date (blank) is being passed as 01/01/0001 which is not a valid date in SP. Think the minimum date is 01/01/1900 (Not entirely sure if this is correct). If you pass a bogus date you will not hit the issue.

HTH
Vernon

Thanks Vernon. I have submitted the help ticket and will try to update this topic when I get a response.


In the mean time, if anyone has a workaround for clearing a date in sharepoint, I'm all ears. I tried using the 1900-01-01T00:00:00, and it does complete the workflow, but it stores that value in the doc metadata, and would be confusing to my users.


Thanks.


Am I right in saying you pass the datetime value from InfoPath through K2 document event to update a SP datetime column?


Vernon


Just updating this thread in case anyone else ever runs into this problem.


I am using another app for data entry, not InfoPath, but I imagine it would behave the same way. I also found that you cannot clear out dates in a SQL database through the SmartObjects. Even the tester treats null dates as "no update", instead of removing the data.


According to K2 both of these issues are slated to be resolved in the 1390 build. Hopefully that will be the case.


Reply