Date format changes with date() function

Functions date() and ().to_date change the format of the dates.
I’m fetching some dates from a dataset (with the function from_dataset()) and casting them with date(…) because i need to add some days to them.
But when i do that i lose the original format of the date, in the dataset they are represented as
dd-Mon-yyyy.
There is any way to save the format?

date(from_dataset(“datasetName”, “datasetField”, criteria)) + days(5)

try
(date(from_dataset("datasetName", "datasetField", criteria)) + days(5)).to_date.strftime("%Y-%m-%d")

1 Like