<@U04SE163WC8> {{ (today_utc() )}} convert this to...
# ask-ai
h
@kapa.ai {{ (today_utc() )}} convert this to Unix timestamp
u
To convert the current date to a Unix timestamp in Airbyte, you can use the
timestamp()
macro. This macro converts a number or a string representing a datetime (formatted as ISO8601) to a timestamp. If the input is a number, it is converted to an int. If no timezone is specified, the string is interpreted as UTC. Here is an example of how you can use it:
Copy code
python '{{ timestamp(today_utc().strftime('%Y-%m-%d')) }}'
This will convert the current date in UTC timezone to a Unix timestamp. Please note that this is based on the [Airbyte's YAML Reference](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference#macros) for Interpolation macros.