Hey, I am trying to get the time with get text activity and it looks like this 6:27 AM
how do I convert it to datetime or how can I check the difference between this time and local time
Use like this
Now.Subtract(Datetime.ParseExact("6:27 AM","h:m tt",System.Globalization.CultureInfo.InvariantCulture))
To get hours use .TotalHours
Similarly .ToMinutes, .ToSeconds etc
cheers
Hi,
FYI, another approach:
(CDate(Now.ToString("yyyy/MM/dd ")+yourString.Trim)-Now).ToString
Regards,
2 Likes
Thank you, @Yoichi , it worked!
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.