Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Especificar en una pregunta si es día o tarde

  • chamacocab
  • chamacocab's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 9 months ago #182142 by chamacocab
Como puedo especificar en una pregunta si es de día o tarde según sea el horario?


Por ejemplo: Buenos "días" o "tardes" gracias por el interés de contestar esta encuesta..
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #182216 by Joffm
Hola,

lea el manual por
www.limesurvey.org/manual/Expression_Man...mplemented_Functions
Hay una función "date"

Por los parametros lea aqui:
php.net/manual/es/function.date.php

Con date("G") vas a recibir la hora del dia de 0 hasta 23.

Asi puedes decir
{if(date("G")<12,"Buenos dias",if(date("G")<20, "Buenas tardes", "Buenas noches"))}
o como quieres.

Saludos
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: holch, chamacocab
The topic has been locked.
  • chamacocab
  • chamacocab's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 8 months ago #182217 by chamacocab
Replied by chamacocab on topic Especificar en una pregunta si es día o tarde
Ya lo leo y le aviso como me va..

Saludos.
The topic has been locked.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose