using {timestamp} and spjs.utility.addItem
- This topic has 1 reply, 2 voices, and was last updated 6 years, 5 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Home › Forums › Classic DFFS › using {timestamp} and spjs.utility.addItem
Hello,
I’m using spjs.utility.addItem and one of the target fields is a date time field.
I’ve tried a few different methods, but I keep getting error occurred while creating the child item: Invalid date/time value. Is there a parse or formatting I need to do when inserting data into date time fields? I am needing the date, as we are triggering workflow reminders off of a calculated date & time.
I have tried:
spjs.dffs.buildValStr(“{timestamp}”)
as well as:
spjs.dffs.buildValStr(“{timestamp[MM/dd/yyyy]}”)
When adding an item like this, the format is ISO8601 so you must use this format:
spjs.dffs.buildValStr("{timestamp[yyyy-MM-ddThh:mm:ssZ]}");
Alexander