Add time to date column

Solved!
HValderrama
Level 2
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

0 Kudos
1 Solution
tgb417

@HValderrama 

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,    

--Tom

View solution in original post

0 Kudos
2 Replies
tgb417

@HValderrama 

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,    

--Tom
0 Kudos
HValderrama
Level 2
Author

Tom,

Thanks for your reply; the formula worked as expected.

Labels

?

Setup info

?
A banner prompting to get Dataiku