Date time

Updated 3 weeks ago by Devinder Singh

Introduction

This article explains the mapping of date time fields. Byteline provides a powerful way of configuring date time by typing the various supported formats.

Expressions

You can specify the date time using an expression that refers to a date time output from another node in the flow or the flow input. Byteline automatically determines the date time format and parses it to generate the format required by the integration. However, you can use the parseDate function to control the date-time parsing.

Absolute formats

Below are several formats of date time supported by Byteline. You can copy and paste the format and then change it according to your needs. The time part optionally supports AM/PM along with the timezone (in the three-letter form, e.g., PST).

  1. tomorrow at 9PM
  2. next Friday at 7PM
  3. 2/13/2022 8PM EST.This is an example of the U.S. date (MM/dd/yyyy) format along with the timezone.
  4. 2020-10-26T16:56. If the timezone is not provided, the default account timezone is used.
  5. 1393462573. Unix-based time, aka epoch. Both seconds and milliseconds e.g. 1393462573000 version is supported

The date can be typed directly into the text field as shown in the below example:

Relative formats

You can also configure the date time relative to the current time. You can either add or subtract months (mo), weeks (w), days (d), hours (h), and/or minutes (m). This format must start with + or -

  1. +1mo. 1 month from now.
  2. -3w. 3 weeks before now.
  3. +3h30m. You can also mix and match various formats as shown in this example.
  4. +3d. Three days from now.

The relative dates can be directly typed into the text field as shown below.

Functions

If the above formats don't meet your requirements, two functions are provided to work with dates.

  1. now: This function can be used to output the current time in the format your need. Learn More.
  2. parseDate: This function can be used to parse the date time from the flow input data or the output data of a node. Learn More.


How did we do?