Guardar valores entre dos horas diferentes con intervalos de 30 minutos

buen día con todos

tengo la necesidad de guardar
al cliente
la hora de inicio
la hora final
image

y que el formato que guarde es de la siguiente manera
image

como se puede apreciar al momento de guardar no guarda solo 1 sino 3
aumentando de 30 en 30minutos esto quiere decir que el intervalo es de 30 min
con el mismo contenido que es el cliente para todos

¿alguna idea?

Really bad idea to use times as node identifiers. Probably better to reverse things:

fechas
|
  -- luis : ["08:00:00","09:30:00"]

If the same name will be used, then consider using an array

fechas
|
  -- 0 : ["luis","08:00:00","09:30:00"]
  -- 1 : ["luis","09:45:00","10:30:00"]

there are other ways to do this, using firebase....

lo que pretendo es que una vez guardado en el firebase

obtengo al cliente mediante sus etiquetas que coincidan con mi cuadro
según la imagen

image

Perhaps this would be better:

fechas
|
 -- luis
    |
      -- 0 : "08:00:00 a 09:30:00"
      -- 1 : "09:45:00 a 10:30:00"

 -- juan
    |
      -- 0 : "08:30:00 a 09:00:00"
      -- 1 : "11:30:00 a 12:30:00"

pero como guardo en 3 líneas teniendo tan solo 2 valores seleccionado en el desplegable como estos
08:00:00
09:30:00
como sumo de 30 en 30 para guardar

Sorry, I do not understand. You appear to keep changing your requirements ?

nooo
la pregunta no a cambiado como dice el titulo

Guardar valores entre dos horas diferentes con intervalos de 30 minutos

con estos datos
image

pretendo guardar esto
image

saludos

OK, if that is how you want to store the data, what is the problem ? Explain very clearly what it is you want to achieve.

guardar de la siguiente forma
image

con estos datos
image

What have you tried ?

Using the Firebase component, with ProjectBucket set to "fechas":

image

image

image

image

solo e llegado hasta allí no tengo idea como aumentar de 30 en 30 para poder guardar

image
esto es algo imaginario se que no esta correcto pero mas o menos es lo que necesito

Why did you switch the tag and value parameters around. I thought you were determined to have the times string as the tag ? :upside_down_face: You will run into trouble when you try to add another times value.

Your problem is that, for example, "08:00:00" is a string, not a number or a time. You will need to take this string, convert it to a time, add 30 minutes, then convert back to a string.

You may find this easier if you work in milliseconds?

como puedo convertirlo en una hora después de seleccionarlo y agregarle los 30 minutos?

definitivamente tengo que tener un factor en otra columna para multiplicar la veces que se aumentara los 30 min y hacerlo coincidir

image

If only we knew what you are trying to achieve.....

Perhaps it might be easier to make a list? Here is one I started.

te explico
es para el alquiler de un servicio por horas normalmente se alquila cada media hora
hay veces que el cliente desea alquilar 2 horas o 2 horas 30 minutos
es por eso que selecciono la hora que empezara y la hora que terminara para darle pase a otro usuario

a la vez deseo visualizar las horas alquiladas para poder alquilar a otro usuario

nesecito dos listas de inicio y final obligado

So you wish to store:

  1. The current User Name
  2. Rental Start Time
  3. Rental End Time

I suggest you forget about seconds and use:

  1. Rental Arrangement Unique Reference ID (Also serves as database Tag)
  2. User Name, Address, Phone Number
  3. Date, Start Time Hours Minutes
  4. Date, End Time Hours Minutes
  5. Description of item/service being rented if more than one type

Is the data to be stored in the Cloud (internet) or only on your device (Smartphone)?

algún ejemplo con ID de referencia

RefID.aia (1.9 KB)