Add time to date column
I have a column with the same date format (2023-01-10T19:30:13.807Z).
I need to add 30 min to show the following: 2023-01-10T20:00:13.807Z
Operating system used: Windows
Best Answer
-
tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,598 Neuron
Welcome to the Dataiku community. We are so glad to have you join us.
There are a number of ways to get this done. One of the simpler ways is in a visual prepare recipe. In there you can add a formula step. Here is some background on visual recipes
https://knowledge.dataiku.com/latest/data-preparation/formulas/concept-formulas.html
In a formula step you can use the function Inc (standing for increment)
inc(LastUpdated, 30, "minutes")
* Where LastUpdated above is an example of a name of a column in your dataset. (It can be what ever is a column formatted in standard format.
The more complete date function documentation can be found here:https://doc.dataiku.com/dss/latest/advanced/formula.html
Here is a longer thread on this subject.
https://community.dataiku.com/t5/Using-Dataiku/How-to-add-a-months-to-given-date/m-p/9355
Hope this helps. Let us know how you get along with this,
Answers
-
HValderrama Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 4 ✭
Tom,
Thanks for your reply; the formula worked as expected.