convert string to int

I have a time string that is like the following: 07:20:00 PM and I need to convert that to a int or double.

The reason being is I have time events that happen between a certain time of the day. So something happens between 12:00PM and 2:14PM

Am I looking at this wrong or is there an easier way to do it?

if you’re using c# try this (make sure you add “using System” to the start of your script)

string value = "123"
int number; 
bool result = Int32.TryParse(value, out number);

by using a bool here you can see if the parsing was successful or not