Converting this date string to date time format?

Hello everyone,

I was wondering how I can calculate the difference between two dates that I have (both of which are currently in different string formats)
2019-10-02 08:00:00
09/26/2019 09:57:41

Can someone please tell me the easiest way to convert these into DateTime format so that I can get the time difference in hours?

If you have any further questions please let me know :slight_smile: .
The first string is pulled from an email body and always follows that format and the second one is from the time of an outlook message received (email.Headers(β€œDate”)) so it will also always be in that format.

Thanks a bunch,


1 Like

here you go with the xaml
hope this would help you resolve this (10.2 KB)

Cheers @rileythiessen

Awesome it worked! Thank you :slight_smile:

Do you know why I get an error when I use something like 09/26/2019 13:00:00 . Anything past 12:00:00.
How do I calculate for later times after noon then?

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