DateTime problems in Automation rules

Article:HOWTO7435  |  Created: 2007-05-30  |  Updated: 2007-05-30  |  Article URL
Article Type
How To

I want an automation rule to create a new incident when I choose a quick incident. 

Using International time when I set the date of the new incident equal to the due date of the old incident, then the log gives me:

Description: Incident: new System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.GetDayOfNNY(DateTimeResult result, DateTimeRawInfo raw,

NameValue[] workitemData, String notifyRuleIDs, Attachment[] attachments, String auxdata, Boolean mergeAuxData, UploadedFileList upl, WorkItemCommitOptions commitOptions)

The webservice used by the automation rule does not support international formats, you can use an advanced assignment in the automation rule URL where you do the following

set: workitem_due_on
to : HDQUERY[[ SELECT CONVERT(varchar, convert(datetime, 'WORKITEM(workitem_due_on)' ,104),101) ]]
type: datetime

It will show up in your assignment list as set "Due" to "Due" but the code is still correct. Note that you need to set the numbers (I use 104 and 101) in the HDQUERY to the correct value for your locale, you can use the documentation for the Convert command (SQL command) to find out what numbers you should use.

Legacy ID


Article URL

Terms of use for this information are found in Legal Notices