Hello!
I have a problem with these date type variables, the syntax are:
.=date(‘01/01/1900’) or (.>=date(‘01/01/2021’) and .<=date(today()))
.=date(‘01/01/1900’) or (.>=date(fecha_nacimiento_m) and .<=date(today()))
I hope you can help me.
Thanks
Hello!
I have a problem with these date type variables, the syntax are:
.=date(‘01/01/1900’) or (.>=date(‘01/01/2021’) and .<=date(today()))
.=date(‘01/01/1900’) or (.>=date(fecha_nacimiento_m) and .<=date(today()))
I hope you can help me.
Thanks
Hola @christian_silvera
Con tan poca información es complicado ayudar. Para tener más chance de obtener una respuesta lo mínimo es poner capturas de pantalla de la pregunta y los detalles, e incluso mejor poner el cuestionario/parte de el en XLSForm en adjunto. y más que nada una explicación de qué es lo que quieres obtener.
Pero bueno, vamos a intentar:
fecha_nacimiento_m, entonces tienes que poner ${nombre_de_la_pregunta}
today() pero eso te dejo hacer pruebas.También encuentras infos en otra pregunta del foro aquí
Saludos
Hello @Vico!
Thanks for your answer.
My question is regarding what is the syntax in the constraint column.
For example:
I want that in a date type question the pollster can enter the date 01-01-1900 when he does not know and that when he does know the date it can only be between 01-01-2021 and today
@christian_silvera, you could use the following constraint as shown in the image below:
1900-01-01 when a date is unknown

1900-01-01 and below 2021-01-01
2021-01-01 and above


Date Constraint.xls (38 KB)
thank you so much @Kal_Lam . It is exactly what I needed!!!
Hola a todos, leyendo este post lo que estoy haciendo me funciona perfectamente en Enketo pero al usar Collect ya no funiciona por mas que intente ingresar cualquier fecha, se que es por el formato en la restricción que tengo pero no se cual sea el formato correcto a usar en Collect.
Saludos,