1. Tasks
  2. Save Sugartime

Tasks

Save Sugartime

The Save Sugartime task allows complelx relative dates to be calculated and saved to `stub.data`.

Basic usage

Save a future reminder date for tomorrow

loading...

Parameters

fieldname

required
string

This is the fieldname to which the data will be written to in stub.data


when

required
string
/
array

The relative date to be calculated. This can be any valid SugarTime string. For example, tomorrow at 9am or next friday at 5pm

This can also be an array of strings. The first item will be used as a starting point, subsequent items will be calculated from that point in time. This is useful for more complex date calculations, ["two weeks from today", "friday at 5pm"]

Result

loading...

Properties

fieldname

Name of the field created : reminder_date


savevalue

Caculated date value using the follow datetime format: YYYY-MM-DD HH:mm:ss

2024-01-01 09:00:00

Examples

These are some more complex examples

Save Sugartime using when array

loading...
Result
loading...

Save Sugartime with custom formatted datetime

Saves fieldname in stub.data using custom formatted Sugartime date.

loading...
Result
loading...

Save Sugartime with Heimdall formatted dates

Saves fieldnames in stub.data for Heimdall formatted Sugartime dates.

loading...
Result
loading...