Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Petr Vileta
  Where is Petr Vileta?
 Pilsen
 Czech Republic
 Petr Vileta
 To: Tony Vignone
  Where is Tony Vignone?
 St Augustine
 Florida - United States
 Tony Vignone
Subject: RE: decimal number and time in the same form
Thread ID: 468667 Message ID: 468703 # Views: 37 # Ratings: 0
Version: Visual FoxPro 8 Category: VFP and .NET
Date: Monday, September 23, 2019 10:10:18 PM         
   



> >
> > Maybe you mean InputMask to "99:99" :)
> >
> > OK, but in this case the 2nd textbox (say variable X) is string, so bad for validating. Better will be a decimal number like "99.99" where I can validate
> >
RETURN BETWEEN(INT(X),0,23) AND BETWEEN(MOD(X,1),0,59)

> >
> > Petr
> > Punk and Foxpro is not dead
>
> No, you will find that the input mask of 99:99 is insufficient. The minutes need to be one greater. "99:999" Read InputMask help.
>
> Validate with
>
BETWEEN(left(x,2),"00","23") and BETWEEN(right(x,2),"00","59")

>
> Tony

Maybe you mean this ;-)


The colon or W letter is simply ignored in input. Finally I decided to save the time of day as decimal number with 2 decimal places. For users will be simple to use numeric keyboard for writing.

Petr
Punk and Foxpro is not dead

ENTIRE THREAD

decimal number and time in the same form Posted by Petr Vileta @ 9/21/2019 4:58:50 PM
RE: decimal number and time in the same form Posted by Tony Vignone @ 9/21/2019 5:35:42 PM
RE: decimal number and time in the same form Posted by Petr Vileta @ 9/21/2019 10:07:59 PM
RE: decimal number and time in the same form Posted by Jun Tangunan @ 9/22/2019 2:24:20 AM
RE: decimal number and time in the same form Posted by Tony Vignone @ 9/22/2019 1:50:17 PM
RE: decimal number and time in the same form Posted by Koen Piller @ 9/22/2019 5:35:00 PM
RE: decimal number and time in the same form Posted by Tony Vignone @ 9/22/2019 6:55:23 PM
RE: decimal number and time in the same form Posted by Koen Piller @ 9/22/2019 10:09:11 PM
RE: decimal number and time in the same form Posted by Tony Vignone @ 9/23/2019 5:47:40 PM
RE: decimal number and time in the same form Posted by Petr Vileta @ 9/23/2019 10:10:18 PM