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 7358 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I know I've previously posted a time formatting question, but for the life of me I can't get it to work the way I want to. In Access I was able to format the time so the user would time four digits (####), and the time would format ##:##. I can't get that to work in FM Pro (so far, that's been the only thing I can't get it to do vs. access).

I've tried everything, I thought it would be as simple as choosing the format (military time), and the separater ":". Right now when the user types in "1515" it will format as "1515:00". I really, really want to stay away from having to manually type in the colon as it's a annoying and time consuming keystroke (the user will most likely have to look at their keyboard if they aren't profecient typists).

I have it set to hhmm and ":" as the separator with the 24-hour clock. The example shows "23:09", but when I type in 2309 it displays 2309:00. And one other thing, I noticed if you time in "3500" it will show up as a time... I thought the computer would know there isn't a 35:00hr??

Please, can anyone help? Why isn't this as easy as MS Access?

Vandy

Posted

Make your time field auto-enter by calculation, replacce existing value.

Use this calculation

Time ( Left ( Time; 2 ) ; Right ( Time ; 2 ) ; 0 )

Format the field as you have.

Posted

I think maybe the crux of the problem is that FM considers times in a way that is not helpful for your current task. It is thinking not (necessarily) of a time of day, but a number of hours. It's true that from a time-of-day perspective, there is no 3500. However, it is possible to think of 35 hours -- as in, there are 35 hours between 1 am Sunday and noon Monday -- and that is how FM is approaching it.

As far as the entry issue you identify: It's not that this is easier in M$ Acce$$, it's just different. How can an application decide whether a user means "1515:00" or "15:15"? I suppose FMInc could make this an option on the field, but there's a whole host of things they could make options. In your case, i think your best bet may be to make the entry field a number field, and then create a calc time field that converts the text entered into time in the way you want. You could set up the entry field with validation rules, such as (entryField <= 2400) and (entryField >= 0). Then your calc time field would be something like:


Time(Hours(Int(entryField/100));Minutes(Mod(entryField;100));0)

HTH,

Jerry

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