Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 08:16 AM
Hi,
You have different options, one could be to setup the job with multiple parameters. So one parameter called `year` is represented by `{{job.start_time.[year]}}`, another `month` represented by `{{job.start_time.[month]}}`, etc.
Alternatively, you could pass a single argument like `{{job.start_time.[iso_datetime]}}` and then parse each of the values of interest in your program. For example:
```
import datetime
iso_datetime: str = dbutils.widgets.get("iso_datetime")
date_object = datetime.datetime.strptime(iso_datetime, "%Y-%m-%dT%H:%M:%S.%f")
print(date_object.year, date_object.month, date_object.day)
2024 5 1
```
Hope this helps.