Yki Posted May 11, 2020 Posted May 11, 2020 Student has guitar class on Monday at 13:00. I have fields for instrument, day of week and time of day (time field). I can format the time field to show only hours and minutes, great. When I make a calculation field to show--- "Your (instrument) lesson is on (day of week) at (time of day)" --- hours, minutes AND seconds show up again in the time of day. How do I get rid of the seconds in this calculation?
comment Posted May 11, 2020 Posted May 11, 2020 (edited) You can do your own formatting = Hour ( Timefield ) & SerialIncrement ( ":00" ; Minute ( Timefield ) ) Alternatively, if this is on the same layout, you could "steal" the already formatted time as displayed in your time field = GetLayoutObjectAttribute ( Timefield ; "content" ) But do you really need a calculation field for this? If this is for printing/display, you could simply merge the fields into a text object and apply the same formatting to the object as you have to the time field. Edited May 11, 2020 by comment
Yki Posted May 11, 2020 Author Posted May 11, 2020 Can you explain the first option a little? I don get what the serialIncrement does... SerialIncrement ( ":00" ; Minute ( Timefield ) )
comment Posted May 11, 2020 Posted May 11, 2020 21 minutes ago, Yki said: I don get what the serialIncrement does... It formats the minutes with a ":" prefix and a leading zero. Read more: https://fmhelp.filemaker.com/help/18/fmp/en/index.html#page/FMP_Help%2Fserialincrement.html%23
Yki Posted May 11, 2020 Author Posted May 11, 2020 Interesting. Thank you. And yes, "merge field" is good for me here:)
Recommended Posts
This topic is 1919 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 accountSign in
Already have an account? Sign in here.
Sign In Now