Skip to main content
Skip table of contents

How-To Insert a Date into any Field

Overview

When you are sending a report to a stakeholder or automate uploading a file, you may want to include the current date or time in the file name to let your stakeholder know when the report was ran.

Steps

  1. Navigate to a Task with a field that you want to include a date.

  2. In the field, reference the Platform environment variables related to the Fleet or Vessel's Start Time. A full list of Platform environment variables can be found here.

Ex. ${MARKETPLACE_WORKFLOWRUN_START_TIME_YEAR}-${MARKETPLACE_WORKFLOWRUN_START_TIME_MONTH}-${MARKETPLACE_WORKFLOWRUN_START_TIME_DAY}. This will return a string with year-month-date. Feel free to add any other information before or after the date setup, but never inside the ${} environment variable reference.

f you need to reference the file name again downstream, we recommend using MARKETPLACE_WORKFLOWRUN_START_TIME variables because these times will be unchanging throughout the current run.

If you want the time to be different for every Vessel, use the MARKETPLACE_WORKFLOWRUN_START variables. This will require you to use regex match to find the file name downstream in the same Fleet.

If you need to reference the file name again downstream, we recommend using FLEET_START_TIME variables because these times will be unchanging throughout the current run.

If you want the time to be different for every Vessel, use the VESSEL_START_TIME variables. This will require you to use regex match to find the file name downstream in the same Fleet.

Other Date Examples

Here are some other general use-cases:

Example Output

Field Entry

report_09-21-2022.csv

report_${MARKETPLACE_WORKFLOWRUN_START_TIME_MONTH}-${MARKETPLACE_WORKFLOWRUN_START_TIME_DAY}-${MARKETPLACE_WORKFLOWRUN_START_TIME_YEAR}.csv

2022/09/report.csv

${MARKETPLACE_WORKFLOWRUN_START_TIME_YEAR}/${MARKETPLACE_WORKFLOWRUN_START_TIME_MONTH}/report.csv

1663769254_report.csv

${MARKETPLACE_WORKFLOWRUN_START_TIME_EPOCH}_report.csv

report_09-21-2022_14:07.csv

report_${MARKETPLACE_WORKFLOWRUN_START_TIME_MONTH}-${MARKETPLACE_WORKFLOWRUN_START_TIME_DAY}-${MARKETPLACE_WORKFLOWRUN_START_TIME_YEAR}_${MARKETPLACE_WORKFLOWRUN_START_TIME_HOUR}:${MARKETPLACE_WORKFLOWRUN_START_TIME_MINUTE}

report(14:07:34).csv

report(${MARKETPLACE_WORKFLOWRUN_START_TIME_HOUR}:${MARKETPLACE_WORKFLOWRUN_START_TIME_MINUTE}:${MARKETPLACE_WORKFLOWRUN_START_TIME_SECOND}).csv

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.