How to convert a String variable to DateTime variable


I use Read Cell activity to obtain an Arrivaltime for a flight. output is a string variable.
And i need to convert that string to a datetime variable to use in Add Outlook Appointment activity.

how do i do that.

Also we can work with

  • DateTime.Parse(
  • DateTime.ParseExact( – for having more control

There are many post on this topic, so also have a quick research on this if more details are needed


I´ll dont really understand.
can you please finish my code below. Because i have tried DateTime.Parse without success.

Thanks in advance

Its depending on the string, that you give into conversion function
just debug and tell us what is the result of read cell

Name: ankomst type: String Value “0640”

0640 looks like the arrival time, only have hour and minute info
with extending this by the corresonding landing date we can do:

if we ommit todays date will be taken, looks like

I´ll get this message when i try your solution,
[Option strict on disallows implicit conversions from ‘Date’ to ‘string’ ]

What newbie mistake have i done :slight_smile:

statement returns a dateTime, so variable datatype is DateTime

wow, im so confused.
converttodatetime.xaml (5.0 KB)

please check the xaml.

What is 0640? Is that supposed to be a date? A time? Will it always be that format (4 digits)?

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