Following columns are from Extract Data Table, I need to add date column. The rows are not certain but columns are fixed so Date should be written to number of columns are there.
You can add column by Add Data Column activity.
For this show some input data and what you are expecting.
Thanks,
Ashok
This are th3 columns extracted by extract data table and I want to add date at start of the column on A1 how should I do it?
Here is the solution for this.
Solution:
Before rearranging the Columns:
After Rearranging the columns:
Sample Code:
GetText.xaml (10.6 KB)
Thanks,
Ashok
Take a Build Datatable Activity:
And Include all the columns you want as a output including Date Column at first!
Output of above activity: dt_Output
Use below LinQ in assign activity:
dt_Output = (
From row In dt_Input
Select dt_Output.Rows.Add(row.ItemArray.Prepend(Now.ToString("dd-MM-yyyy")).ToArray)
).CopyToDatatable
Note: Replace dt_Input as Extracted Datatable, dt_Output is Output datatable with date column.
You can change date format according to your requirement by changing in the LinQ.
Input & Output with Dummy data:
Workflow Screenshot for your reference:
Attaching .xaml for your reference:
AddDateColumn_Sequence.xaml (13.4 KB)
Regards,
Ajay Mishra
@Ajay_Mishra @ashokkarale Sorry for late and I ve got the answer
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.