1

I have created a date field that prints out the time for a list of courses offered at a local employment office. I have used a custom input format (h:i A) for the user to input their course start/end time. When the new course listing is created the date field displays 0000-4:30PM to 6:30PM. I assumed the 0000 is representing the year attribute which is selected by default and I am unaware how to change it’s default setting.

I have also included a screen captures below:

enter image description here

enter image description here

I’m still rather new to Drupal so I’m not sure what step I am missing.

System Information:

  • Drupal 7
  • Bartik 7.12

1 Answer 1

2

Intrigued by your question, I found the same issue with trying to use a date field to store a time as the date field stores a Unix Timestamp.

A Drupal 7 project called timefield allows you to store a time which has no relation to a date, even has duration, and display configuration. I have not used it in a live environment, but looks like a solution for you.

3
  • 1
    I looked into the timefield module as possible solution but with it's current stages in dev/alpha it's a drawback. Commented Jul 2, 2012 at 12:13
  • 1
    Agreed, but take a look, test, contribute issues and suggestions to the community. Some things never leave Beta, but are great, just not 100%.
    – Duncanmoo
    Commented Jul 2, 2012 at 16:57
  • You were right timefield does solve my issue. I'm going to take you advice and keep working with this module to help improve it and get it off the ground. Commented Jul 6, 2012 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.