Date Component
  • 13 Feb 2023
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Date Component

  • Dark
    Light
  • PDF

Article summary

The Date component consists of blocks that perform all operations related to date and time.

New Date

This block returns the current date as an object.

Block LayoutGenerated Code
Date
new Date();

Date Format

This block returns the date object in the default format.

InputOutputBlock LayoutGenerated Code

Date Text value as a variable or text - input-1 

Format of the date text (input-1)as a variable or text - input-2


Returns the default Date format for the given date.


__er.newDate('2020/01/12', 'YYYY/MM/DD');

Date Properties

This block returns the details of the date property selected for a specified date.

InputOutputBlock LayoutGenerated Code

Select the type of date property from the dropdown list 

Date input as a variable or object - input-1


Returns the data property as text


 
(new Date()).getFullYear();

Date to Text

This block returns the date in a string format.

InputOutputBlock LayoutGenerated Code

Date object value as a variable or a date object - input-1

Format value as a variable or text - input-2


Returns Date as a text value for the given format.



__er.dateToString((new Date()), 'YYYY/MM/DD');


Was this article helpful?

ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence