Jump to content

Input Mask


y2kmental

This topic is 6319 days old. Please don't post here. Open a new topic instead.

Recommended Posts

When you input 24, it should turn to 00:24

Should it? I dissagree here as well. It should be more nested!

If just one digit is entered should it go to the very first position before the ":" ...if two and the first perhaps is 0 should still go to position before the ":" ...if 3 ciffers, again with the distinction containing 0 as first digit or not etc.

In short does it need to go into a Choose( statement using both the word length and a check if first, and counting of initial "0"'s

Just some thoughts???

--sd

Link to comment
Share on other sites

...so, Soren, something like this ?

Choose(

Length ( TimeField ) ;"";

TimeField & ":00:00";

TimeField & ":00:00" ;

Left ( TimeField ; 2 ) & ":" & Middle ( TimeField ; 3 ; 1 ) & "0:00";

Left ( TimeField ; 2 ) & ":" & Middle ( TimeField ; 3 ; 2 ) & ":00";

Left ( TimeField ; 2 ) & ":" & Middle ( TimeField ; 3 ; 2 ) & ":" & Middle ( TimeField ; 5 ; 1 ) & "0";

Left ( TimeField ; 2 ) & ":" & Middle ( TimeField ; 3 ; 2 ) & ":" & Middle ( TimeField ; 5 ; 2 )

)

Link to comment
Share on other sites

...so, Soren, something like this ?

No like this, after some considerations!

GetAsText ( Time ( Int(Left(Left ( entry ; 2 ) & "0";2)) ; Int(Middle ( entry & "00" ; 3 ; 2 )) ; 0 ) )

Forcing the user to use a leading 0 when low hours.... here where no am/pm'ing is standard do I think it makes some sense.

--sd

Link to comment
Share on other sites

This topic is 6319 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.