Convert Object back into datetime format

Hello,
I have a datatable and work with the command “for each row” to access individual data. To keep it clear I use functions and pass the current row over the arguments into the function. The argument is of type System.datarow . The Datarow has different variable types (String,Datetime,INT32 etc.)
But in the function the argument has only the type Object and I don’t know how to restore the Datetime format.

Assign:
Datetime_var = Row(“Columnname”)…

Can you help me ?

Regards

Scathara

just found something on google

CType(Object, Datetime)

could this work? compiler says no error

Greetings Scathara

@Scathara1 Can you tell us exactly what you want to do ? Is it Just to change the datatype in the Excel or a Datatable? Also if you have found the solution to the problem, please post it and Mark it as a Solution with a Description.

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