# Add New Column (Expressions, Date time)

**URL:** <https://forum.knime.com/t/add-new-column-expressions-date-time/31199>\
**Category:** KNIME Analytics Platform\
**Created:** [March 5, 2021, 12:42pm UTC](https://forum.knime.com/t/add-new-column-expressions-date-time/31199 "2021-03-05T12:42:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kotvir](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/k/b77776/32.png) [@kotvir](https://forum.knime.com/u/kotvir)\
**Post date:** [March 5, 2021, 12:42pm UTC](https://forum.knime.com/t/add-new-column-expressions-date-time/31199/1 "2021-03-05T12:42:53Z")

</div>

Hi Guys,

I have just started exploring Knime for ETL.  
I am coming from Informatica, SSIS and Alteryx background.

I am finding it quite difficult to add new columns with every row along with expressions.

For example, for everyrow I store in oracle table, I want its Date time stored aong with that row in a dedicated column (assume it as Load\_Date).

Also, where do I write expressions for such new columns ?

Any tips appriciated.

Cheers,  
Vir

---

<div class="post-metadata">

**Author:** ![andrejz](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/b19c9b/32.png) [@andrejz](https://forum.knime.com/u/andrejz)\
**Post date:** [March 5, 2021, 1:33pm UTC](https://forum.knime.com/t/add-new-column-expressions-date-time/31199/2 "2021-03-05T13:33:36Z")

</div>

Hi @kotvir ,

To add a column with the timestamp you can use the Create Date&Time Range node.  
For Expresions there are nodes like “Column Expressions” and “Math formula”.

Regards

---

<div class="post-metadata">

**Author:** ![kotvir](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/k/b77776/32.png) [@kotvir](https://forum.knime.com/u/kotvir)\
**Post date:** [March 5, 2021, 2:24pm UTC](https://forum.knime.com/t/add-new-column-expressions-date-time/31199/3 "2021-03-05T14:24:48Z")

</div>

Hi, I did create date range, but it’s creating for one row. As I mentioned I need for each row as a derrived column. For each row being generated from source, I need a column like Load\_Date as current date time.

---

<div class="post-metadata">

**Author:** ![andrejz](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/b19c9b/32.png) [@andrejz](https://forum.knime.com/u/andrejz)\
**Post date:** [March 5, 2021, 3:12pm UTC](https://forum.knime.com/t/add-new-column-expressions-date-time/31199/4 "2021-03-05T15:12:40Z")

</div>

Hi @kotvir  
You can do something like this [Append timestamp.knwf](https://forum.knime.com/uploads/short-url/yszWhyche3ZCLUPpE8GE23CHobJ.knwf) (1.5 KB)

Regards

---

<div class="post-metadata">

**Author:** ![kotvir](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/k/b77776/32.png) [@kotvir](https://forum.knime.com/u/kotvir)\
**Post date:** [March 6, 2021, 12:12pm UTC](https://forum.knime.com/t/add-new-column-expressions-date-time/31199/5 "2021-03-06T12:12:42Z")

</div>

Hi @andrejz , this wf is not opening.

---

<div class="post-metadata">

**Author:** ![andrejz](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/b19c9b/32.png) [@andrejz](https://forum.knime.com/u/andrejz)\
**Post date:** [March 6, 2021, 12:43pm UTC](https://forum.knime.com/t/add-new-column-expressions-date-time/31199/6 "2021-03-06T12:43:57Z")

</div>

Hi,

Maybe was something wrong during the export … [Append timestamp.knwf](https://forum.knime.com/uploads/short-url/rRZDDjURkw86P11ZtNqfWdrjz1L.knwf) (18.0 KB)

![image](https://forum-cdn.knime.com/uploads/default/original/3X/7/2/7254d0c7167982db36b78d776149c3f9c0ed96fa.png)

---

<div class="post-metadata">

**Author:** ![kotvir](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/k/b77776/32.png) [@kotvir](https://forum.knime.com/u/kotvir)\
**Post date:** [March 7, 2021, 10:02pm UTC](https://forum.knime.com/t/add-new-column-expressions-date-time/31199/7 "2021-03-07T22:02:44Z")

</div>

Hi @andrejz , this gives me constant value of date and time, I need the exact date time with seconds and m seconds with every row reaching destination

---

<div class="post-metadata">

**Author:** ![andrejz](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/b19c9b/32.png) [@andrejz](https://forum.knime.com/u/andrejz)\
**Post date:** [March 8, 2021, 6:05am UTC](https://forum.knime.com/t/add-new-column-expressions-date-time/31199/8 "2021-03-08T06:05:24Z")

</div>

Hi @kotvir

I do not know if is the best solution but you have to use a loop for every row, do the calculations and then register the time of execution and append a column. In my example the “Wait” node is just for simulate the execution of the workflow.

[Append timestamp.knwf](https://forum.knime.com/uploads/short-url/kJ1yLWggUB7Ym1fqTHN9dqRhsgJ.knwf) (19.0 KB)

Hope this helps

---

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [March 8, 2021, 9:57am UTC](https://forum.knime.com/t/add-new-column-expressions-date-time/31199/9 "2021-03-08T09:57:26Z")

</div>

Hello @kotvir,

and welcome to KNIME Community!

It’s not possible to create/have such load timestamp for each row in DB table from within KNIME. Best you can do is what @andrejz suggested - same timestamp for all records. To have load timestamp you have to create such column(s) in database:

> <https://stackoverflow.com/questions/2455974/making-a-datetime-field-in-a-database-automatic>

Additionally have a look at this topic where KNIME ETL capabilities are discussed:

> [@Knime Use Cases](https://forum.knime.com/t/knime-use-cases/25787):
>
> Hi everyone, I am trying to understand what are the main use cases for Knime. What problems does it help solving? What it can do that other tools can’t. Are there alternatives? The reason I am asking - I was asked to evaluate if my company needs Knime (someone from leadership have heard of the tool in the conference). Hence I am here collecting facts. So far, after little research, my understanding is as follows. Knime is: Business users / non-developer friendly ETL tool: Alternatives would …

Br,  
Ivan

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [September 6, 2021, 9:57pm UTC](https://forum.knime.com/t/add-new-column-expressions-date-time/31199/10 "2021-09-06T21:57:59Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
