February 14, 200619 yr Hi, Can anyone give me some suggestions on setting up an input mask so that when I enter date or time I don't have to type in the / or : seperators and can just type in the numbers instead? Thanks.
February 14, 200619 yr Hi check this custom function for the date problem BTW that custom wasn't made for american formatted date, but it will be no difficult to modify. (you have to enter that calc on a AutoEnter/Replace field)
February 14, 200619 yr Hi if you have read that custom, you'll know that the result will be a PseudoDate text (not a real date). To get a real date you have to use the function: GetAsDate (PseudoDate) The same will be for the time and the calc is: Let( isNumber = If( Filter ( yourPseudoTimeField ;"1234567890" ) = yourPseudoTimeField;1;0); Case( isNumber; Case( Length ( yourPseudoTimeField ) = 1; "00:00:0" & yourPseudoTimeField ; Length ( yourPseudoTimeField ) = 2;"00:00:" & yourPseudoTimeField; Length ( yourPseudoTimeField) = 3;"00:0" & Left ( yourPseudoTimeField ; 1 ) & ":" & Right ( yourPseudoTimeField ; 2 ); Length ( yourPseudoTimeField) = 4;"00:" & Left ( yourPseudoTimeField ; 2 ) & ":" & Right ( yourPseudoTimeField ; 2 ); Length ( yourPseudoTimeField) = 5;"0" & Left ( yourPseudoTimeField ; 1 ) & ":" & Middle ( yourPseudoTimeField ; 2;2 ) & ":" & Right ( yourPseudoTimeField ; 2 ); Length ( yourPseudoTimeField) = 6;Left ( yourPseudoTimeField ; 2 ) & ":" & Middle ( yourPseudoTimeField ; 3 ;2 ) & ":" & Right ( yourPseudoTimeField ; 2 ) ); "") )
February 16, 200619 yr Author Thanks for coming to my rescue. Amazing that there isn't an easier way to do this. Once upon a time ago I used Access and it had a much easier way to setup input masks. Oh well. Thanks again!
Create an account or sign in to comment