I can't add time to a date for checking schedules

Hi all, how are you?. Happy new 2026!

Well, look, I have an app where I want to restrict the available time schedules to the ones not occupied in a specific day. the problem is like follows":

I want to use the formula in the valid if field in order to restrict the date values that can be used in the respective column as follows: if exists any appointment on the same day in what I want the new appointment and the time period of the appointment matches the time period of the existing appointments then appsheet doesn’t allow to use that time period, the formula is the following:

ISBLANK(
  FILTER(
    "Gestión de Consultorios",
    AND(
      DATE([Start]) = DATE([_THISROW].[Start]),
      [_THISROW].[Start] < ([Start] + (Configuración[Duracion_Cita (Minutos)] * 0.00069444)),
      ([_THISROW].[Start] + (Configuración[Duracion_Cita (Minutos)] * 0.00069444)) > [Start]
    )
  ) - LIST([_THISROW])
)


but just in those lines which has formulas like

[_THISROW].[Start] < ([Start] + (Configuración[Duracion_Cita (Minutos)] * 0.00069444))

two things happens, one is that the multiply of the [Duracion_Cita (Minutos)] (a number stored as text) field by the factor 0.00069444 gives almost zero and appsheet rounds it to zero then the time in minutes never gets added, the other is that if I do the addition by the following form

[_THISROW].[Start] < ([Start] + "000:" & (Configuración[Duracion_Cita (Minutos)] & ":00")

then appsheet thinks that the part

"000:" & (Configuración[Duracion_Cita (Minutos)] & ":00"

or is zero or says the + operator doesn’t support date or time or something similar, the other lines is almost the same

so, how can this be solved?

Thanks in advance for the help

1 Like

What are these supposed to be doing?

that part of the formula detects any time period that matches and existing time period as follows:

the following line checks if the time that I set in the [Start] field of the form is less than any stored [Start] field plus 45 minutes (by row)

[_THISROW].[Start] < ([Start] + (Configuración[Duracion_Cita (Minutos)] * 0.00069444))


the following line

([_THISROW].[Start] + (Configuración[Duracion_Cita (Minutos)] * 0.00069444)) > [Start]

checks if the time I set in the [Start] field of the form plus 45 minutes is greater than any stored [Start] field (by row)

the factor is one minute divided into 1440 minutes per day

summing up, the complete formula checks if the date of any created appointment is equal to the date of the appointment that I’m creating, then compares the start and end date of the appointment that I’m creating (by using only the [Start] field) to see if matches the existing ones, then those who matches are returned by the filter function, finally the isblank function is used to any time period that doesn’t match the existing ones (suggested by gemini). NOTE: the part

- LIST([_THISROW])

is used to avoid to cancel the appointment in case that I’m edditing one of the created appointments

Explain the Configuración table or slice.

The configuration table is a calendar table, specifically a google calendar, bellow are the relevant fields for this matter

as you can see, the Start and End fields are DateTime type; the [Duracion_Cita (Minutos)] is a text field in another table in text format

1 Like

In your expression, Configuración[Duracion_Cita (Minutos)] means “the list of all values from the Duracion_Cita (Minutos) column of the Configuración table”, which is likely not what you want. Please explain in plain language what value you want there. We’ll figure out how to translate it to an expression.

2 Likes

look, I have one value stored for that, what I want is to add the value in that column to the Start of the appointment, that is what I want.

In the future I will have differents appointment durations based in where the people will be cited