Format for times

Hi, is there a number or other format for times - preferably in 24h clock format? At the moment I am trying to use a generic number format.

For example, a shop may only be open from 09:00 until 15:00 (on weekdays).

Thanks

Yes, when you display the time as text on a page, you can click to add :formatted as after the dynamic data you insert. From there, youā€™ll be prompted to select whichever format you want.

Thanks - however it only seem to offer ā€˜US Phoneā€™ as an option for me. Maybe there should be a format called ā€˜timeā€™ in the same way that there is one called ā€˜dateā€™.

1 Like

Iā€™m not sure what you mean. US Phone shouldnā€™t be your only option. Screenshot?

If the field is a date/time field, then you will get the date/time formatting ā€¦ it is contextual to the type of field.

Sounds like you have a phone number field ?

I am using the data page to define these fields as types, then going to the input and text boxes to use ā€˜formatted as:ā€™.

I think I got ā€˜US phone numberā€™ for the format when I tried to set the field as type ā€˜numberā€™

When I try field type ā€˜dateā€™ (there is no ā€˜timeā€™ or ā€˜date/timeā€™) it wants me to input a date when I try to write in that data table, whereas I only want a time option. What I am doing wrong?

Thanks

Simon

Yes, it seems to set the time to 00:00 internally on the database when using the data page (bubble seems to have a couple of these hidden data parts, like GPS lat/long on address).

But you can still pull them out and use them on pages i.e. it just shows the time. I would image you would have to set the date to something standard (1/1/2000) and just have a time displayed and update that.

Soā€¦add your dates in the data page. Then have a simple admin page that has a repeating group pulling out time, and then update ?

well, at the moment the field is defined as type ā€˜dateā€™ (so that I can access the formatted as: options that include hh:mm).

When I try to input a new time, it thinks I am inputting text so gives an error message that says it needs it to be date format. but then I canā€™t display it as hh:mm.

I will try again tomorrow - maybe I have made a mistake

Date/time formatting does seem quite awkward, so I wonder if there is a better way to store a time and format it ?

Let us know if you find a way :smile:

Not really, usually what people do is to store that as a number.

is there a number format that looks like a time? e.g., hh:mm:ss. I have tried entering this into a field with type ā€˜numberā€™ but it only saves the ā€˜hhā€™ digits - or do you mean to make a field for hours, one for minutes and one for seconds?

Thatā€™s what people have done so far.

ok so I need one input box for the hours and another for the minutes? I canā€™t find a way to input hh:mm and then pick the first 2 digits (hh) to store in one field and the last 2 (the mm after the :slight_smile: to store in another.

There is ā€¦

:truncated to
and
:truncated from end to

Will that work ?

Hi, now I have stuck in the same problem. I have a radio button, which have 3 lines. The condition which I want is that the first line should be shown to the users only between 09:00 to 15:00.

No conditions on the next 2 lines.

Thanks in advance.

More of the same problem.

I used the advice in this thread to store my HH:mm times as separate integers in the database. So Iā€™m storing hh in one field and mm in the other field as integers. I have to do some subtraction of times to arrive at hours and things like that, so I separated them to integers.

BUTā€¦ I canā€™t find an option to display them properly now. When I use dynamic text, instead of ā€œ3:00ā€ it shows ā€œ3:0ā€. It does not force a double digit display for a zero minute value. How can I change this so it displays properly?

1 Like