CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Show only dates and not time?
Pages: [1]

Author Topic: Show only dates and not time?  (Read 1096 times)

mcnamedia

  • Guest
Show only dates and not time?
October 22, 2008, 11:59:37 am
Hi folks, in the EventInfo.tpl I'd like to edit to only show the dates, but not the times. Is that possible?

Thanks,
Greg

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Show only dates and not time?
October 22, 2008, 01:22:22 pm
Yes, civicrm has built in date-formatting functions.

First, I assume you're following the protocol on this page and not hacking the core templates: http://wiki.civicrm.org/confluence/display/CRMDOC/Customize+Built-in+and+Profile+Screens
 
To do what you want, you would change line 17 from

Code: [Select]
{$event.event_start_date|crmDate}
to
Code: [Select]
{$event.event_start_date|date_format:"%B %d, %Y"}
or whatever formatting you want (you use the strftime formatting: http://us.php.net/manual/en/function.strftime.php)

You would then find the end_date line on the same page and do the same.

mcnamedia

  • Guest
Re: Show only dates and not time?
October 30, 2008, 02:01:10 pm
Sorry for the late reply - a big thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Show only dates and not time?

This forum was archived on 2017-11-26.