Create date
Function: Create date
This action allows you to easily generate various date values within your application. Whether you need the current date, a date in the past or future, or a specific static date, this function provides a straightforward way to create and use these date values without any coding.
Input,
- Type: Choose the method for creating your date.
Now: Creates a date representing the current moment.First day of this year: Creates a date for the first day of the current year.First day of this month: Creates a date for the first day of the current month.First day of a year: Creates a date for the first day of a specified year.First day of a month: Creates a date for the first day of a specified month in a specified year.Now minus something: Creates a date by subtracting a certain amount of time from the current moment.Now plus something: Creates a date by adding a certain amount of time to the current moment.Static date: Creates a specific date you provide.
- Unit: (Appears if 'Type' is 'Now minus something' or 'Now plus something') Select the unit of time you want to add or subtract (e.g., Nanos, Seconds, Minutes, Hours, Days, Weeks, Months, Years).
- Amount: (Appears if 'Type' is 'Now minus something' or 'Now plus something') Enter the number of units you want to add or subtract.
- Year: (Appears if 'Type' is 'First day of a year' or 'First day of a month') Enter the specific year you want to use.
- Month: (Appears if 'Type' is 'First day of a month') Enter the specific month (1-12) you want to use.
- Date (yyyy-MM-dd): (Appears if 'Type' is 'Static date') Enter the exact date you want to create in 'YYYY-MM-DD' format (e.g., 2023-10-27).
Output,
- Name: The name you give to the new date variable. This variable will store the date value created by this action, which you can then use in other parts of your application.
Execution Flow,
Real-Life Examples,
-
Example: Set a deadline for a task one week from now.
- Inputs:
- Type:
Now plus something - Unit:
Days - Amount:
7 - Name:
TaskDeadline
- Type:
- Result: A variable named
TaskDeadlinewill be created, holding the date and time exactly one week from the moment the action runs. You can then use thisTaskDeadlinevariable to display the deadline to users or trigger reminders.
- Inputs:
-
Example: Record the start of the current fiscal year.
- Inputs:
- Type:
First day of this year - Name:
FiscalYearStart
- Type:
- Result: A variable named
FiscalYearStartwill be created, storing the date January 1st of the current year. This can be useful for financial reporting or data filtering.
- Inputs:
-
Example: Schedule a project review for the first day of a specific future month.
- Inputs:
- Type:
First day of a month - Year:
2025 - Month:
3 - Name:
ProjectReviewDate
- Type:
- Result: A variable named
ProjectReviewDatewill be created, storing the date March 1st, 2025. This date can then be used to populate a calendar event or a notification.
- Inputs:
-
Example: Define a fixed holiday date.
- Inputs:
- Type:
Static date - Date (yyyy-MM-dd):
2024-12-25 - Name:
ChristmasDay
- Type:
- Result: A variable named
ChristmasDaywill be created, storing the date December 25th, 2024. This variable can be used to check if a specific date falls on Christmas.
- Inputs: