Data table with date column

Hi,

I have extracted a data table with a “date” column.

I am adding this value to my own data table by using for each row (in string format)

Here is my question: how can i change the format to a date, so that it both is accepted to the data table, but also stored as an variable?

BR Karsten

You will need to create a new column with the Date datatype and update the rows with the converted version of your string dates.

Unfortunately, you cannot change the datatype of a column in one step, since it would erase the data.

2 Likes

Thanks for the reply!
Which one of these variables would do the job?
image
My date is writtes as “07/05/2020”

System.Datetime would be best.

Is this the same type as Excel uses for dates?

image

The assign function is: new datetime(2020,05,07)

@Karsten_Bertelsen I guess the variables that you have used in the DateTime() are not of integer type, Can you change it to integer and check if it works.

1 Like

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