Actions74
- ai Actions
- array Actions
- audiovideo Actions
- carbone Actions
- charts Actions
- code Actions
- data Actions
- datetime Actions
- events Actions
- files Actions
- geo Actions
- hellospaces Actions
- images Actions
- Get Metadata of an Image
- Scale an Image
- Overlay an Image on another Image
- Scale an Image to Fit Given Dimensions
- Resize an Image
- Mask an Image with Another Image
- Mask an Image with a Circle Mask
- Crops an image by the given x, y, width and height paramters.
- Convert Texts to an Image
- Convert HTML String or URL to an Image
- Generates a QRCode with given text and color.
- Get EXIF from Image
- Remove EXIF from Image
- Modify Image EXIF
- playground Actions
- spreadsheet Actions
- stripe Actions
- youtube Actions
datetime → Check Date against Condition
AI-generatedOverview
This node checks a given date against a specified condition using the "datetime" resource and the "Check Date against Condition" operation. It is useful for automating workflows that require validation or categorization of dates, such as determining if a date is valid, checking for leap years, identifying weekdays/weekends, or verifying UTC format.
Practical examples:
- Validating user-inputted dates before processing.
- Filtering records to only include those from weekends.
- Triggering actions on leap years.
- Ensuring date strings are in UTC format.
Properties
| Name | Meaning |
|---|---|
| Date | The date to check. Supported formats: - DD.MM.YYYY - DD.MM.YY - DD.MM.YYYY HH:mm - DD.MM.YY HH:mm - MM-DD-YYYY - MM-DD-YYYY HH:mm - MM-DD-YY - MM-DD-YY HH:mm |
| Condition | Condition to check the date against. Options: - isDate: Checks if the input is a valid date. - isLeapYear: Checks if the year is a leap year. - isUTC: Checks if the date is in UTC format. - isWeekday: Checks if the date falls on a weekday. - isWeekend: Checks if the date falls on a weekend. |
Output
- The output will be a JSON object containing the result of the date check. The structure typically includes:
- A field indicating whether the condition was met (e.g.,
true/falseor similar). - If an error occurs, the output will contain an
errorfield with details about the issue.
- A field indicating whether the condition was met (e.g.,
Example output:
{
"isLeapYear": true
}
or, in case of error:
{
"error": "Invalid date format"
}
Dependencies
- External Service: Requires access to the 1001fx API.
- API Key: You must configure the
1001fxApicredential in n8n. - Environment: No additional environment variables required beyond standard n8n setup.
Troubleshooting
Common Issues:
- Invalid date format: Ensure your date matches one of the supported formats.
- Missing credentials: Make sure the
1001fxApicredential is set up in n8n. - API errors: Network issues or invalid API keys can cause failures.
Error Messages:
"Invalid date format": The provided date does not match any accepted format. Double-check your input."Missing required property": One of the required fields (DateorCondition) is missing."Authentication failed": Check your API key configuration.