Date time

Updated 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 using an expression that refers to a date output from another node or from the flow input. Byteline automatically determines the date time format and parses it to generate the format required by the integration.

Parsing by function
parseDate functions should only be used when automatic date parsing doesn't work.

This function can be used to parse the date time from the flow input data or the output data of a node. Learn More.

Writing dates

If you don't want to get a date from an expression, it can be specified using the below formats.

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:

If the date is specified in the MM/dd/yyyy format e.g., 02/10/2023, we assume the first part (02) to be the month. If your dates are coming from an expression and you must handle dates with dd/MM/yyyy format, please use Byteline's parseDate function.
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 - . Below tokens can be used. You can combine multiple tokens, as shown in the examples section.

m (minutes)
h (hour)
d (days)
w (weeks)
mo (months)

Examples

+1mo -> 1 month from now.
-3w -> 3 weeks before now.
+3h30m -> 3 hours 30 minutes from now
+3d -> 3 days from now.

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

Functions

You can use the below function to specify the dates.

  1. now: This function can be used to output the current time in the format your need. Learn More.


How did we do?