Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi Team,
I want to create scenario variable as custom date format a yyyy-mm-dd or dd-mm-yyyy hh:mm:ss from now() function where it has T & Z characters in date time format.
could you please help on it how to create formals in defining scenario variable in scenario steps?
Thanks in advance.
Operating system used: windows
import datetime
from dataiku.scenario import Scenario
scenario = Scenario()
my_date=datetime.datetime.now().strftime('%Y-%m-%dT%H:%M:%SZ')
scenario.set_scenario_variables(my_date=my_date)
print("****** " + my_date)
[variables={"my_date": "2024-05-08T08:38:23Z"}]
[2024/05/08-08:38:23.047] [Exec-98379] [INFO] [process] - ****** 2024-05-08T08:38:23Z