I have a time value represented in SYSTEMTIME, i want to add/subtract 1 hour from it and get the newly obtained SYSTEMTIME. I want the conversion should take care of the date change on addition/subtraction or month change or e1 year change .
Can someone help me with this if there is some windows api which does arithmetic on SYSTEMTIME
If you’re using C# (or VB.NET, or ASP.NET) you can use
You can use negative numbers to subtract:
EDITED:
I extract an asnwer from this post
If you want to add an hour use
SYSTEMTIME s2 = add(s1, 60*60)