Welcome to the LimeSurvey Community Forum

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

Time Format AM/PM

  • kkellytpl
  • kkellytpl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 9 months ago #155342 by kkellytpl
Time Format AM/PM was created by kkellytpl
I am using the date/time question type and using HH:MM as the date/time format. Is there a way to get the date/time to display as 12 hour time with AM/PM instead of 24 hour time?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 9 months ago #155343 by tpartner
Replied by tpartner on topic Time Format AM/PM
This works for me:

dd/mm/yyyy, h:MM A



More on formats here - momentjs.com/docs/#/displaying/format/

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: kkellytpl
The topic has been locked.
  • kkellytpl
  • kkellytpl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 9 months ago #155344 by kkellytpl
Replied by kkellytpl on topic Time Format AM/PM
I did try "h:MM A" before. After trying again, I found it only works with display drop down boxes set to off. Thank you tpartner!
The topic has been locked.
More
5 years 3 months ago - 5 years 3 months ago #177195 by jlwood
Replied by jlwood on topic Time Format AM/PM
This works in version 2.67 if the field is not mandatory. For mandatory fields the value is rejected unless the user makes a change to each individual part of the date and time.
Last edit: 5 years 3 months ago by jlwood.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #177205 by tpartner
Replied by tpartner on topic Time Format AM/PM
Can you please try it in the current demo site and if the problem still exists, please file a bug report.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
5 years 3 months ago #177243 by jlwood
Replied by jlwood on topic Time Format AM/PM
It seems to be working correctly on the Demo site in version 3.1. Wish we were in a position to upgrade. Unfortunately my institutions server isn't quite LS3x-ready just yet and at the moment I depend on plugin that is LS2 only. We're getting around the problem by taking off mandatory and using some page validation.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose