Skip to main content

ModifyDateTime

This Script is part of the Filters And Transformers Pack.#

Takes a date or time input and adds or subtracts a determined amount of time. Returns a string in date or time in ISO Format.

Script Data#


NameDescription
Script Typepython3
Tagstransformer, date
Cortex XSOAR Version5.0.0

Inputs#


Argument NameDescription
valueInput date or time in a format that is supported by the dateparser.parse() function as outlined here- https://dateparser.readthedocs.io/en/latest/#popular-formats. For example: '2020-01-01' or '1999/02/03 12:01:59'
variationVariation of time (for example: 'in 1 day', or '3 months ago'). Must be supported by the dateparser.parse() function here - https://dateparser.readthedocs.io/en/latest/#relative-dates

Outputs#


There are no outputs for this script.

Script Example#

!ModifyDateTime value=2020,02,02 variation="1 day"

Context Example#

{}

Human Readable Output#

2020-02-01T00:00:00