views:

46

answers:

1

currently the output from my date field entries reads like this Sun, 25/04/2010 - 10:00am - Sun, 02/05/2010 - 5:00pm but I would prefer it to read like this Sun, 25/04/2010 - Sun, 02/05/2010 10:00am - 5:00pm is there a drupal beginner way of doing this?

A: 

Yes, you need to site Configuration -> Date and Time -> Formats -> Add Formats

Here you can plug in PHP date function elements to create new displays. The link to the PHP date format page is http://php.net/manual/en/function.date.php.

For instance:

g:i    results in 15:45 

G:i A  results in 3:45 PM

and so forth...

Once you have added the format in Drupal, you will see it in views and in the CCK diplay area as a choice for date display.

Updated Ok, I see. I just built a timesheet application for our company intranet built on the drupal platform. I separated the times from the dates by making them all separate fields. In other words, instead of one date field with a "to" and "from" with all levels of granularity. I made three fields.

  1. To and From Date (displayed as June 3, 2010)
  2. Start Time (displayed as 7:00am)
  3. End time (displayed as 7:00am)

On the input side, it's exactly the same; and, you can create a custom tpl.php file to theme your form (view or edit) to look how you want.

Otherwise, that date field spews out as one string, and there isn't too much that can be done with it.

cinqoTimo
well thanks for the answer but you misunderstood my question - I don't want to change the format or add a new format, I want to make the time range appear after the date range
Maurice
Updated response..In the right direction?
cinqoTimo
thanks, looks like I need to start again and use more fine-grained fields - boo hiss drupal
Maurice