i have a variable with time 10:00AM formatted as a string, I need to compare this against the current time. The date function returns integers. if I use parseInt on the string and slice it up, I don't get the leading zero's.
Where does this timestring come from? Do you manually enter this string? Is it from an external source that you have no control over?
When you say compare, do you mean less than, greater than, or just equals?
Easier? Perhaps better!
If I take a guess at what you are doing, you enter a time then you use and inject node set to repeat and are looking for when the time arrives? That means polling every second or so. A better ways to use a node that permits you to program a time then it triggers at that time
Or perhaps you are trying to make some kind of time gate. Where events are only allowed to happen before or after the specified time?
But I am speculating so I will wait for your replies before proposing any potential solutions.