How can I configure my date field in yaml to alway...
# ask-ai
e
How can I configure my date field in yaml to always have a date of yesterday
k
You can use the built‑in
day_delta
Jinja helper in your connector YAML to always set a date to “yesterday”. For example, in a `DatetimeBasedCursor`:
Copy code
yaml incremental_sync:   type: DatetimeBasedCursor   cursor_field: date_reference   end_datetime:     type: MinMaxDatetime     datetime: '{{ day_delta(-1, format="%Y-%m-%d") }}'     datetime_format: '%Y-%m-%d'   datetime_format: '%Y-%m-%d'
Here,
day_delta(-1, format="%Y-%m-%d")
evaluates at runtime to yesterday’s date in
YYYY-MM-DD
format. [[Datetime cursor 1.8](https://docs.airbyte.com/platform/1.8/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/DatetimeBasedCursor); [AsyncRetriever issue](https://github.com/airbytehq/airbyte/issues/51533)]