Change Value in Datatable

Hi everyone, I’m desperate for datatables. Can anyone help me?

I have some dates in a datatable ( in the format “05/20/2020 19:00:00”.

I want to output the whole datatable into a google sheet and use the GSuite.Activities function “Write Range”.
The output works without errors. But the date will be displayed in the google sheet as “2020-05-20T19:00:00.000Z”.

Why does it do this?

I would need the format “20.05.2020 19:00:00”. So I tried to customize each row of the datatable with the function For each row and the assign command : row(“Time”) = row(“Time”).tostring(“dd.MM.yyyy HH:mm”).

during debugging, however, every time an error occurs: "Assign: A call target has caused an exception error. "
No matter what I try I can’t change values in a datatable. I tried it without for each with datatablename.rows(1).item(“time”) = “test”. same result.
Also other datatables and other datatypes do not work.
I have seen this question asked in the forum many times but none of the solutions work for me.

can anyone tell me what I am doing wrong?

Thanks for your help


@Scathara1 - try below -

Datetime.ParseExact(row(time).ToString,“dd.MM.yyyy HH:mm:ss”,System.Globalization.CultureInfo.InvariantCulture)

thank you for your answer. first i have to find out why i can’t change a value in may datatable… i tried to change another value. I can’t even replace one string with another string.