mbiwpeoyc Posted October 28, 2005 Share Posted October 28, 2005 I'm trying to write a small time card app to help me keep track of comp time/vacation time. I'm having problems figuring out how to get the math to work properly with standard time format, so I switched to the 24 hour clock. I've also got it stripping the : and what not .. i.e. instead of 9:00pm I get 2100. This worked great until I remembered my time clocks are done on 30 minute increments, and then it hit me. 2130 doesn't mean it's half past the hour. Technically it's only 1/3 into the hour based on the number alone. So I thought to convert any :30 minute blocks using stringinstr to 50's which would fix that problem. However, it's difficult and I was hoping there's an easier time calc function or someone might have an idea to help out. Thanks for your time ! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 29, 2005 Moderators Share Posted October 29, 2005 Valuater made a "work time clock" if you want to do a search for it, I didn't see it on his signature or his site. I'm sure he used some time math in it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted October 29, 2005 Share Posted October 29, 2005 Valuater made a "work time clock" if you want to do a search for it, I didn't see it on his signature or his site. I'm sure he used some time math in it.That still in process ronrules ( i added too many options )however... i dont understand why 2130 is not equal to 21 hours and 30 minutestry this...#include <Date.au3> MsgBox(0,'',"The time is:" & _NowTime(4))8) Link to comment Share on other sites More sharing options...
mbiwpeoyc Posted October 29, 2005 Author Share Posted October 29, 2005 (edited) First, Thank you for your posts Second : I'm not using system time that's why, and I'm converting it from 12:00 to 2100 and using regular normal arithmetic for the rest. That's why 2130 = two thousand one hundred thirty instead of 21hrs 30mins. I'm trying to re-invent the wheel however it sounds like. Edited October 29, 2005 by mbiwpeoyc Link to comment Share on other sites More sharing options...
Confuzzled Posted October 29, 2005 Share Posted October 29, 2005 First, Thank you for your posts Second : I'm not using system time that's why, and I'm converting it from 12:00 to 2100 and using regular normal arithmetic for the rest. That's why 2130 = two thousand one hundred thirty instead of 21hrs 30mins. I'm trying to re-invent the wheel however it sounds like. Hint, convert everything to minutes and work from that. Microsoft uses Monday 1/1/1601 AD at 10:00AM internally as their starting date and calculates the number of seconds from there. Julian dates use the number of days since noon on 1/1/4713 BC.See the Date.au3 included in your /AutoIT/include/ folder for hints.Good luck! Link to comment Share on other sites More sharing options...
mbiwpeoyc Posted October 31, 2005 Author Share Posted October 31, 2005 Hint, convert everything to minutes and work from that. Microsoft uses Monday 1/1/1601 AD at 10:00AM internally as their starting date and calculates the number of seconds from there. Julian dates use the number of days since noon on 1/1/4713 BC.See the Date.au3 included in your /AutoIT/include/ folder for hints.Good luck! Thank you! I feel semi uhhh... :"> well that sums it up Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now