December 26, 200619 yr Is there a way to enable an input feild mask, so users dont have to enter the ':' in time.. 22:00, takes longer to enter 2200 would be easier -> transformed to 22:00 thanks
December 26, 200619 yr Author well it works when i type 24, it turns it to 24:00. But if i type 1645 it displays 1645:
December 27, 200619 yr 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
December 27, 200619 yr ...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 ) )
December 27, 200619 yr I was referring to the calculation I have linked to. If implemented correctly, you should get 00:24 when you input 24. Whether that is the desired result, is another question.
December 28, 200619 yr ...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
Create an account or sign in to comment