1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

datetime → Check Date against Condition

AI-generated

Overview

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/false or similar).
    • If an error occurs, the output will contain an error field with details about the issue.

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 1001fxApi credential 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 1001fxApi credential 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 (Date or Condition) is missing.
    • "Authentication failed": Check your API key configuration.

Links and References

Discussion