Combining date & time fields

Using a formula field, is it possible to take a time field and a separate date field to create a DateTime value?

@Co1in

You can use the default edited or credated field, which is a date / time field?. If you use it in a table rule you can update it automatically.

Hi @slimpens,

Thanks for responding! Iā€™ve realised I didnā€™t explain my use case clearly enough.

I have a table with existing records that include a date field called {Service Date}. Iā€™ve recently added a {Service Time} field (Time type, e.g., 9:00 AM) and a {Max Late Minutes} field (Number type).

The goal is to use these three fields to calculate a datetime after which I can notify a manager if someone hasnā€™t arrived to complete a task. Since I canā€™t directly filter records using these three fields, I was hoping to use a Date Formula field (or another approach) to generate a usable datetime for filtering records and triggering actions.

Does that make sense? Appreciate any suggestions!

Yes, you can use a formula field in Tadabase to combine a date and time field into a single DateTime value. Hereā€™s how:

  1. Create a Formula Field in your data table.
  2. Combine Date and Time using a formula like:

CONCATENATE(TEXT({DateField}), " ", TEXT({TimeField}))

Ensure both fields are in text format before concatenating.
3. Format the DateTime to match a recognized format (e.g., YYYY-MM-DD HH:MM:SS).
4. Save and Test the formula field to ensure it displays the combined DateTime value.

Yes, that makes perfect sense! You can achieve this by creating a Date Formula field that combines the {Service Date} and {Service Time} fields and then adds the {Max Late Minutes} to calculate the datetime after which a notification should be sent. Hereā€™s how you can set it up:

  1. Create a Date Formula Field :
  • Go to your table and click on the ā€œAdd Fieldā€ menu.
  • Select the ā€œEquationsā€ category and choose the ā€œDate Formulaā€ field type.
  1. Configure the Date Formula :
  • Name your Date Formula field, for example, ā€œNotification DateTimeā€.
  • In the Date Formula section, start by adding the {Service Date} field.
  • Add the {Service Time} field to combine it with the date.
  • Use the ā€œ+ā€ operator to add the {Max Late Minutes} field, converting it to a time format (e.g., using a function to convert minutes to hours and minutes if necessary).
  1. Save the Field :
  • Once your formula is set up, click ā€œSaveā€ to create the field.

This new Date Formula field will now give you a datetime value that you can use to filter records and trigger notifications if the task hasnā€™t been completed by the calculated time.

For more detailed guidance, you can refer to the Tadabase documentation on creating Date Formula fields: Equation Fields.

I hope this helps! If you have any more questions, feel free to ask. Have a great day!

1 Like

@Co1in,

I think you can make it easier by just using a date. Based on the outline, it appears that you are building some notification system. So my questions are:

  • You can let automations run overnight and start in the morning with all the fresh updates?
  • Is it necessary to include the time? Say that time is around 4pm (the time that the maneger should be notified). Even if you could run TB to give you a headsup by a notification, what are the chances that itā€™s actually followed up by a manager THE SAME DAY, or it can also be done next morning?

Thanks @moe, but I get stuck is when I click on the ā€˜Add Fieldā€™ button it only displays date fields. The {service time} field is not included in the drop-down list.

Hi @slimpens,
Yes, it is a notification system, but I also need to track in real time if someone hasnā€™t responded to a job. Since we operate 24/7, our KPIs require responses within a set time frame to avoid penalties. To prevent this, managers need visibility on overdue jobs.

I initially planned to use a card on the managerā€™s dashboard to display these jobs, but I now realize an equation field wonā€™t update automatically without user input. Instead, Iā€™ll create a service datetime field when the record is generated and compare it against the current datetime to flag jobs at risk of breaching KPIs.

Iā€™m still learning TB and exploring how to understand the intricacies of the platform. Thanks for responding.