0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

Date and Time → Get Month

AI-generated

Overview

The "Get Month" operation under the "Date and Time" resource in this node extracts month-related information from a given date or year input. This utility is useful when you need to determine the month component from a full date string or just a year, for example, to categorize data by month, generate monthly reports, or trigger workflows based on month-specific conditions.

Practical examples include:

  • Extracting the month number or name from a user-provided date like "2023-01-01".
  • Getting month details for a specific year input to support calendar-based automation.
  • Using the month information to filter or route data in subsequent workflow steps.

Properties

Name Meaning
Date The full date string to extract month information from. Example format: "2023-01-01".
Year The year string to get month information for. Example format: "2023".

Output

The node outputs JSON data containing the month information derived from the provided inputs. The exact structure of the output JSON is not explicitly detailed in the source code snippet, but it typically includes fields representing the month number or name corresponding to the input date or year.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authentication with the external service at https://prod.0codekit.com.
  • The node sends a POST request to the endpoint /dateandtime/month with the input parameters in the request body.
  • Proper configuration of the API key credential within n8n is necessary for successful execution.

Troubleshooting

  • Empty or invalid date/year input: Ensure that the "Date" or "Year" property is correctly formatted (e.g., "YYYY-MM-DD" for date). Invalid formats may cause errors or unexpected results.
  • Authentication errors: Verify that the API key credential is correctly set up and has the required permissions.
  • Network or API errors: Check network connectivity and the availability of the external API service.
  • Missing required properties: Both "Date" and "Year" are optional individually, but at least one should be provided to get meaningful month information.

Links and References

  • No direct links are provided in the source code. For more information, consult the documentation of the external API service at https://prod.0codekit.com if available.

Discussion