Edit this page on GitHub

Home > docs > plugins > Datetime Task

Datetime Task

The datetime task provides methods to populate the current date at the time the flow runs.

The task is provided automatically by Concord and does not require any external dependencies.


The current date as a java.util.Date object:


The current date as a formatted string with a pattern:


An example of this is as follows. Pattern syntax should follow standard java date patterns.


The current date formatted into a date/time string:

${datetime.format(datetime, 'pattern')} 

Parse dateStr string to java.util.Date object:

${datetime.parse(dateStr, 'pattern')}