Hour calculation
How could i figured out the total hours taking the start time which would be created using print localTime as string
"4/12/2011 10:11:18 AM"
and find the difference in hours from star to end.
start = localTime as string
end = localTime as string
print start + end
results:
"4/11/2011 10:15:18 AM"
"4/13/2011 03:10:18 pM"
wanted result:
"4/11/2011 10:15:18 AM"
"4/13/2011 03:10:18 pM"
"xx:xx:xx hours"
Comments
Great
Thanks SwordSlayer,
Yeah I was messing around with the timestamp but like you said, it was giving me problems when it would hit midnight.
Thank you for the solution of using dotNet. Ill be sure to credit you for that.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
No problem,glad to be of some
No problem,glad to be of some assistance.
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters
If the time range would be
If the time range would be short enough, you could use timeStamp for that, but you'd of course have to take into account that it resets the counter at midnight, among other things.
In your case, the dotnet solution should work the best, something like
EDIT: erase the "!REG3XP1!>" from the code... it's just a glitch
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters