Add current date and time in coloumn after excuting qurey

I would like to add a coloumn of current date and time in coloum A snap shoot of my code , basically after query i’m trying to add coloumn with current date and time .

1 Like

After adding Data Column, like in your pictures, you will need to assign the date to each row. So, use a For Each Row with an Assign activity inside. The assign activity will be like row(4) = Now.ToString

To adjust order of column, then do a search on how to set ordinal:

If you want to format the date time slightly differently, you can search for .net date formats online and place it next to the .ToString, like Now.ToString("MM/dd/yyyy HH:mm:ss")

Hope that helps.



I want to add coloumn as first coloumn(first position) not in fourth coloumn(fourth position) and this add coloumn is not working would you mind provding an example of it?

Refer to the search for “Set Ordinal”. I provided a link in my previous post with some answers. :slight_smile:

What isn’t working? You simply add the column name and the datatable in the properties. This will add an empty column. In order to put values in the column, you need to use a For Each activity like I said in my previous post.


Thats throwing an error of ‘DataColumn’ does not have a public instance method named ‘SetOrdinal’ matching the parameter types, generic type arguments, and generic type constraints supplied to InvokeMethod ‘Invoke Method’.

What do you have in the Parameters property. I think you need an Integer for the position

which property ? @ClaytonM invoke method ?

@ClaytonM you mean like this then also I’m getting an
Value cannot be null.
Parameter name: TargetObject

Solved it was due to typo. I need to have add coloumn=“col” and invoke code dt.coloum(“col”) as same.

1 Like

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