DateTime problems in Automation rules
|Article:HOWTO7435|||||Created: 2007-05-30|||||Updated: 2007-05-30|||||Article URL http://www.symantec.com/docs/HOWTO7435|
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
to : HDQUERY[[ SELECT CONVERT(varchar, convert(datetime, 'WORKITEM(workitem_due_on)' ,104),101) ]]
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.
Article URL http://www.symantec.com/docs/HOWTO7435