Time only fields

I have run into many use cases where I don’t need the date associated with a time field. Why because the entity itself is already associated with a day, or the is no day associated with the time.

I will give some examples:
I am building a weather integration that automatically pulls in weather data. There are 3 databases that exists in the integration (Location, Day, Hour).

  • Location entity is tied to a script that pulls in day and hour weather details for a given place
  • Every Day Entity is associated with a date (e.g. Jan 1, 2025), and connected to a location.
  • Every Hour Entity is linked to a day. There are 24 linked to every day

With this structure I can now report on daily weather data and hourly weather data.

On the daily weather data I have fields such as Sunset and Sunrise. It seems pointless to select the day at that time as it is already associated with a day.

Another example I am building a scheduling system. In it I need users to define their availability on a given day of the week. The users will select the time ranges they are free Sunday - Saturday. A date with this is completely irrelevant.

Note there are work arounds. I can use text fields or single select fields to resemble a time.

3 Likes

would also find this very useful

2 Likes

My client wants his employees to log the starting and ending time of work at a customer, so he can calculate how long they were there. His employees are working from their phones. It is a hassle to fill in the date every time (pun not intended :wink:). Can ‘exclude date’ be added as an option for the Date field so it just becomes a time field or can a Time field be added?

Or is there another workaround to do this?

2 Likes

Not the same, but related issue, especially if considering modifying the existing date field capabilities: More Flexible Date FIeld

1 Like

A post was merged into an existing topic: Add Duration as a valid field type

i believe these can be merged. Add Duration as a valid field type

I don’t think so.
I think duration field is equivalent to ‘date timeA - datetimeB’ (expressed in whatever units are appropriate) so it could be e.g. 47 mins, whereas time field is just a fixed point within a 24hr period, e.g. 11:13:26 (13 mins and 26 seconds past 11 o’clock).
They could become functionally equivalent e.g. by setting datetimeB to always be midnight on the date of datetimeA, but I think overall they serve different purposes.
I’d like to collect use cases for each of them separately.

Ah, I think we see this differently.

What you mention here, I have thought of as a way of formatting a calculation. I.E. changing the format on a datetime field to only show the time formatted as 00:00

I’ve often assumed that time fields without a date allow us to enter in time in 1 denomination (say hours) and it is stored on the server as another (say seconds) then rendered in a variety of formats - this is what you call a fixed point. Although I would add that if this was the method, the time could extend past 24hrs.

That said, whether Fibery adds time as a format option to existing datetime fields, it does make sense that time without a date value might need a different field type.