May 31, 2001 #1 dellyjm Programmer Apr 13, 2000 168 JM Hi everyone. I'm a VB developer using fox. Fox is new to me. How do i compare time variables? e.g. Time() > "10:00:02" Delton.
Hi everyone. I'm a VB developer using fox. Fox is new to me. How do i compare time variables? e.g. Time() > "10:00:02" Delton.
May 31, 2001 #2 jimstarr Programmer Feb 6, 2001 975 US Hi Delton, You've got the format right. Time variables are stored in 8-character format, hh:mm:ss. Comparison is as with any character strings. Jim Upvote 0 Downvote
Hi Delton, You've got the format right. Time variables are stored in 8-character format, hh:mm:ss. Comparison is as with any character strings. Jim
May 31, 2001 #3 CDavis Programmer May 5, 2000 155 US Hi Delton, I havent' used the Time() function much but I just did some testing. Assuming that the current time is 08:00:00 you would get the following results. ? Time() > "07:00:00" && evaluate the expression and print the results to the screen .T. && Returns True ? Time() > "09:00:00" && Returns False .F. Hope that helps and maybe others will respond with other ideas. Chuck Davis Upvote 0 Downvote
Hi Delton, I havent' used the Time() function much but I just did some testing. Assuming that the current time is 08:00:00 you would get the following results. ? Time() > "07:00:00" && evaluate the expression and print the results to the screen .T. && Returns True ? Time() > "09:00:00" && Returns False .F. Hope that helps and maybe others will respond with other ideas. Chuck Davis
May 31, 2001 Thread starter #4 dellyjm Programmer Apr 13, 2000 168 JM Ok, good. Now how do i find out the difference in minutes. When I say minutes = time() - "10:00:02" i don't get the desired results. How can i know how many minutes between timex and timey? Delton. Upvote 0 Downvote
Ok, good. Now how do i find out the difference in minutes. When I say minutes = time() - "10:00:02" i don't get the desired results. How can i know how many minutes between timex and timey? Delton.
May 31, 2001 #5 jimstarr Programmer Feb 6, 2001 975 US If you want to do time arithmetic I find it easier to create the variables as datetimes. Datetime variables can be added, subtracted, compared, etc. x = time() x = x + 7 && doesn't work x = datetime() x = x + 7 && works Jim Upvote 0 Downvote
If you want to do time arithmetic I find it easier to create the variables as datetimes. Datetime variables can be added, subtracted, compared, etc. x = time() x = x + 7 && doesn't work x = datetime() x = x + 7 && works Jim