- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Adding 00:00:00 to a date field...
- steinj
- Topic Author
- Offline
- New Member
Less
More
11 years 11 months ago #77895
by steinj
Adding 00:00:00 to a date field... was created by steinj
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.
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.
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
11 years 11 months ago #77921
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic 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.
This should work but I didn't test. Please give it a try and report back.
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 11 months ago #77939
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic 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
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 , plugin development .
I don't answer to private message.
The topic has been locked.
- steinj
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
11 years 11 months ago #77964
by steinj
Replied by steinj on topic Adding 00:00:00 to a date field...
Mazi,
This worked perfectly and was easy to do. Thanks very much for your help.
This worked perfectly and was easy to do. Thanks very much for your help.
The topic has been locked.
- steinj
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
11 years 11 months ago #77965
by steinj
Replied by steinj on topic 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.
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.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 11 months ago #77968
by DenisChenu
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 , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Adding 00:00:00 to a date field...
One link more:steinj wrote: I appreciate the links and level of detail.
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 , plugin development .
I don't answer to private message.
The topic has been locked.
- elitim
- Visitor
10 years 8 months ago #98588
by elitim
Replied by elitim on topic 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
The topic has been locked.