How can I create a date field in Drupal just with hours and minutes without years and months?
Asked
Active
Viewed 3,096 times
2 Answers
4
You should be able to change the granularity when you create the cck field.
Jut select what you need from that Granularity options.
You can also just format the date by creating a new format:
Click on the date and time date format page and then create a new format that looks like this: h:i That's the time and date
Select that format for display.
You can go to the following site to see more Date format string options:

dkinzer
- 32,179
- 12
- 66
- 85
-
if i juct select Hour an Minute i get this error : "Granularity must include a year." – Huzur Polat Sep 20 '10 at 17:30
-
OK I added some extra instructions for changing what is displayed. – dkinzer Sep 20 '10 at 17:39
0
This should also help, http://drupal.org/node/134144#comment-1982750
- how to add your own formats
- set time only or set any php date setting you want

Kevin
- 25,946
- 2
- 19
- 21