swimlane.core.fields.datetime module

class swimlane.core.fields.datetime.DatetimeField(*args, **kwargs)[source]

Bases: Field

cast_to_python(value)[source]

Called during set_swimlane, should accept a single raw value as provided from API

Defaults to no-op

cast_to_swimlane(value)[source]

Return datetimes formatted as expected by API and timespans as millisecond epochs

datetime_format = '%Y-%m-%dT%H:%M:%S.%fZ'
field_type = 'Core.Models.Fields.Date.DateField, Core'
for_json()[source]

Return date ISO8601 string formats for datetime, date, and time values, milliseconds for intervals

classmethod format_datetime(target_datetime)[source]

Format datetime as expected by Swimlane API

get_batch_representation()[source]

Return best batch process representation of field value

get_python()[source]

Coerce to best date type representation for the field subtype