General information
Category:
Coding, syntax & commands
>>>>>>>>>Why do you think she would not allow the entry of 24:00?
>>>>>>>>
>>>>>>>>I think by 'normal' clock time the next time after 23:59 is 00:00. 24:00 is same as 00:00. There is not a time of 24:01 -- it would be confusing to see 24:00 and then 00:01 when the seconds ticked by... Time goes from 00:00 to 23:59 each day.
>>>>>>>
>>>>>>>My problem is that, since I ignore seconds, the minute between 23:59:00 and 23:59:59 is "not accounted" for. The data set by VFP is used by the .NET application: compares the current time with the time set by VFP. So, the .NET application could be reading the current time as 23:59:30 and the logic will tell the problem that this is outside of the day hours/minutes (00:00 to 23:59). But as I type this, I am thinking of the following "solution" When converting the time set by VFP (e.g. 23:59) in the .NET application, I could add the seconds part of 59 (automatically). Therefore, the entire range of time will be accounted.
>>>>>>>Thank you.
>>>>>>
>>>>>>Of course the next question you may need to ask -- to what day does midnight belong? The 00:00:00 notation would suggest that midnight is the beginning of a day, whereas the 24:00:00 notation would suggest it is the end of a day.
>>>>>
>>>>>No, this question would not come up since I decided NOT to use the 24:00:00 but rather 23:59:59.
>>>>
>>>>In doing so, you've also avoided related "can of worms":
>>>>* where does noon belong? is it the end of the first half of the day, or beginning of the latter half?
>>>>* question of the beginning of a time period and the end -- 24:00:00 notation would suggest that first hour of the day would be 00:00:01 to 01:00:00 inclusive.
>>>
>>>I don't think so. First, I am using a military time, 00:00 to 23:59. So, noon is 12:00 and it is just a number.
>>>I am just specifying From and To time (e.g. From 00:00 to 23:59 or from 01:30 to 13:20 and so on). Then I am simply checking if the current time is within the specified From and To times. I would say, that the only problem the program would have is if the current time is 23:59:59 and a fraction of a second. But I don't care about this case.
>>
>>To clarify --- the problems that I mentioned could arise if you selected 24:00:00 notation for midnight. By selecting the 00:00:00 notation you avoided them.
>
>I see then. We are on the same page.
We use 00:00 vs 24:00 in our software, We receive 00:00 from the punch clock, but in the back to do time calculation we translate to 24:00, because for example punch in at 20:00 and out at 00:00 does not lend itself to an obvious calculation, so we translate to 24:00 temporarily to find out the time elapse.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only