Woo! I figured it out, without having to do any crazy type conversions, either.
I used
int TimeCompare = DateTime::Compare(ct, st);
if (TimeCompare >= 0) {
//Throw error
}
Anyone have any idea how to shut the system down in XP now?
Ok, so I figured something out here. Looked up DateTime and found out this little snippet, which works for grabbing the time:
//Get current time ct = DateTime::Now;
Now, what I want to do is compare that to a DateTimePicker object's value (what the user will set the time to shutdown to be)...
Alright... I'm looking absolutely everywhere in MSDN to try and figure this out... but to no avail. I'm trying to get the current time in my Windows Forms Application. All the code I find, doesn't work. I tried this snippet I found in MSDN:
char timebuf[128];
_strtime_s(timebuf);
NOW:
how do I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.