Murilo Belarmino
08/26/2025, 9:40 AMkapa.ai
08/26/2025, 9:40 AMyaml {{ format_datetime(max(config['start_date'], day_delta(-45)), '%Y-%m-%d') }} - max(config['start_date'], day_delta(-45)) ensures the date is not earlier than 45 days ago. - format_datetime(..., '%Y-%m-%d') formats the resulting date as a string in the format your API expects. You do not need to specify the format in day_delta if you are formatting the result afterward. The format_datetime macro expects the input to be an ISO8601 string or datetime object, which is compatible with the output of day_delta and config values, as long as they are in ISO8601 format (which is the default for Airbyte config dates) [see documentation](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/reference#/macros/format_datetime). Example usage: yaml start_datetime: datetime: "{{ format_datetime(max(config['start_date'], day_delta(-45)), '%Y-%m-%d') }}" datetime_format: "%Y-%m-%d" This approach is supported in Airbyte’s low-code CDK and is consistent with the documented macro usage [source](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/reference#/macros/format_datetime).