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

Recommended Posts

Posted

I have a date field, usually have to input like xx:xx in 24 hours format, can I change the input ways to xxxx in 24 hours format then system can auto turns to xx:xxAM or xx:xxPM?

Thanks

Posted

Dear SD

I have try your calc, but can't make it work

can you give me more detail how does your calc work?

I have set field"theTime" format as number, and field of Calc as Time...

anything more that I should know?

Posted

Try this: Call your field TimeEntry I am assuming you data entry will consist of 4 numbers in the 24-hour format e.g. 1320 for 1:20PM. Set TimeEntry as a time field and then do the following Auto-entry by calculation uncheck Do not replace existing value

GetAsTime(Left(Time;2) & ":" & Right(Time;2))

This converts your entry into a time and then you need to set the format on the layout to whatever you want it to look like.

To have predictable results you need 4 digits.

Posted (edited)

Dear SD

I have try your calc, but can't make it work

can you give me more detail how does your calc work?

I have set field"theTime" format as number, and field of Calc as Time...

anything more that I should know?

My aim was to avoid the display format to follow the OS prefs. So I consider textformat as the most flexible. But the reasoning behind is that the number of seconds in one entire day is 86400 and one hour is 3600 seconds. The way filemaker stores both date and time behind the screens is for time the number of seconds from the days beginning and days after the ac/bc threshold, so today is 732172.

I do beyond these fact rely on typecasts in a few places in my calc, where the "&" is dedicating the result stronger than the rest.

I've taken the liberty to sus ahead that if you have an OS pref that dictatates the use AM/PM formate, would the "," be the prefered to ";" in calc although it usually on my side of the pond is ";" ...but you're in Hong Kong - which very well might be a mixture???

--sd

Edited by Guest

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