Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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.

Posted

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)

Posted

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 )

);

"")

)

Posted

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!

This topic is 6916 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.