Adding 00:00:00 to a date field...

Mehr
5 Jahre 7 Monate her #77895 von steinj
steinj erstellte das Thema Adding 00:00:00 to a date field...
Hi Everyone:

I have an application that requires inputting half a dozen dates in a survey-- this is easily done within LimeSurvey, I know. However, these date fields require that the date be followed by a space and then 00:00:00 Note that I don't need an actual time field but actually just need 00:00:00 Is there a way to do this while still allowing use of the calendar or drop-downs for selecting the date. I would hate to lose that capability. I also realize that the 00:00:00 could be appended at the end of the survey using MySQL but my analysts are not MySQL WIZs so I would rather avoid this solution if possible.

The ideal solution would be that the 00:00:00 be added automatically to the date which is acquired through the question's little calendar or drop-down.

Thanks very much.

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
5 Jahre 7 Monate her #77921 von Mazi
Mazi antwortete auf das Thema: Adding 00:00:00 to a date field...
For tsting create a copy of your survey. after activation use a tool like phpmyadmin and change the type of the column which stores the date question to DATETIME. The column can be identified by the SGQA ID: docs.limesurvey.org/SGQA+identifier&stru...#General_Description

This should work but I didn't test. Please give it a try and report back.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
5 Jahre 7 Monate her #77939 von DenisChenu
DenisChenu antwortete auf das Thema: Adding 00:00:00 to a date field...
Hello,

Maybe more easy, wthout changing database etc ...

Use a short text box and add a jquery plugin DateTime picker.

Some example of DateTime picker plugin.
jonathonhill.net/2009-03-27/jquery-datetime-picker/
trentrichardson.com/examples/timepicker/

OR, because you need only DATE 00:00:00 and not a real time:
Use a multi short text (2 subquestion)
- First : with the picker
- Second with the answer with 00:00:00 in SQL format you need.

Use your own jquery option with datepicker:
- jqueryui.com/demos/datepicker/#alt-field to populate Second subquestion
- jqueryui.com/demos/datepicker/#date-formats for SQL date format
- jqueryui.com/demos/datepicker/#event-onSelect to add 00:00:00 at the second subquestion.

Need some jquery works but i think it's the good idea.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
5 Jahre 7 Monate her #77964 von steinj
steinj antwortete auf das Thema: Adding 00:00:00 to a date field...
Mazi,

This worked perfectly and was easy to do. Thanks very much for your help.

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
5 Jahre 7 Monate her #77965 von steinj
steinj antwortete auf das Thema: Adding 00:00:00 to a date field...
Hi Denis,

Thanks very much for your help and suggestions. I'm going to try to figure out how to implement your modifications as I have a feeling I'm going to need this type of knowledge for some other "funny" fields that I need to collect. I appreciate the links and level of detail.

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
5 Jahre 7 Monate her #77968 von DenisChenu
DenisChenu antwortete auf das Thema: Adding 00:00:00 to a date field...

steinj schrieb: I appreciate the links and level of detail.

One link more:
docs.limesurvey.org/tiki-index.php?page=...ime+using+Javascript

;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden um an der Konversation teilzunehmen.

  • elitim
  • elitims Avatar
  • Besucher
  • Besucher
4 Jahre 3 Monate her #98588 von elitim
elitim antwortete auf das Thema: Adding 00:00:00 to a date field...
Hi..that' exactly what I'm trying to do..but it doens't work for me..I did put datepicker, but I don't know how to input the result in the survey :) Can you help ?? tks

Bitte Anmelden um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha