function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BriscoBrisco 

required type dateTime.iso8601 on field dueDateOnly

I'm attempting to insert a date into the DueDate field.  I've tried a few different date formats:

2001-10-03

1985-08-13 15:03

2000-10-31T01:50:00

All keep giving me the error:

required type dateTime.iso8601 on field dueDateOnly

Any ideas on what the correct format should be?

 

DevAngelDevAngel

Hi Brisco,

Have you tried putting an offset on the date?

2000-10-31T01:50:00Z

BriscoBrisco

Yup, just tried that (right after I posted):

        task[5].setKey("dueDateOnly");       
        task[5].setValue("2003-11-20T11:11:11Z");  

"Value 2003-11-20T11:11:11Z not of required type dateTime.iso8601 on field dueDateOnly"

I found the following on one of your posts, but it's for .Net.  Is there an equivalent for Java?

new DateTime(2004, 6, 11, 12, 0, 0).ToUniversalTime()

DevAngelDevAngel

Hi Brisco,

Have you tried:

        task[5].setKey("dueDateOnly");       
        task[5].setValue(dateVal);  

Where dateVal is a Calendar or Date object?

BriscoBrisco
That worked.  Thanks!