Hi
@Rafael GuerraTry this two thinks:
- The name of the variable that you have as output parameter is DateTime, but "DateTime" is a key word from C#. Edit the name, for example "datDateTime" in both parts, in your code and in the output tab.
- Change the language of your VBO to C#. For this, go to the Initialise Page, double clic on the properties, and go to the Code Options tab, here change the Language to C#

Hope this helps you!
See you in the Community, bye :)
------------------------------
Pablo Sarabia
Solution Manager & Architect
Altamira Assets Management
Madrid
------------------------------
Original Message:
Sent: 07-29-2022 15:12
From: Rafael Guerra
Subject: Convert Text in DateTime

Dear Pablo, would that be a suggestion?
I've never needed to do a solution like this, so I'm really confused.
When I checkcode it gives an error.
------------------------------
Rafael Guerra
Original Message:
Sent: 07-29-2022 15:03
From: Pablo Sarabia
Subject: Convert Text in DateTime
Hi @Rafael Guerra
For this is better to use parse function.
Here you have the code to translate the text to the DateTime in your format:
datDateTime = DateTime.ParseExact(strDateTime, "dd/MM/yyyy HH:mm", null);
For my example, datTime is the DateTime data item, and strDateTime my text source, Put this in a VBO using C# and is done
Hope this helps you!
See you in the community :) Saludos
------------------------------
Pablo Sarabia
Solution Manager & Architect
Altamira Assets Management
Madrid
Original Message:
Sent: 07-29-2022 14:16
From: Rafael Guerra
Subject: Convert Text in DateTime
Unable to convert supplied value to a DateTime : Text value '29/07/2021 14:32' cannot be interpreted as a DateTime
Dear, I got this message when capturing this DateTime from a table. Does anyone know how I can resolve this?
------------------------------
Rafael Guerra
------------------------------