date display in event_upcoming
Hello everybody,
I want to use the event_upcoming as an event list.
In my event item I have not filled out an end date or time. Only start date.
It does display a double date notation however.
for example:
28-09-2009 - 28-09-2009 Clinic
How can I make it:
28-09-2009 Clinic
Event_upcoming.tpl:
Re: date display in event_upcoming
Hi,
The gist of it is, where you see:
Code:
<span class="date"><?php echo $this->date; ?></span>
replace with:
Code:
<span class="date"><?php echo $this->firstDate; ?></span>
I believe this will show what you want, regardless of whether you have an end date or a time filled out.
- B
Re: date display in event_upcoming
Thanks.
I really thought that would do the trick. But no....
It makes the date dissapear completely.
Also tried dateBegin, but that does not work either....
Re: date display in event_upcoming
Hmm, I had it working on my end... Doublecheck that your code matches, including capitalization, etc. Also try typing it by hand if you cut and pasted the first time (just to replace "date" with "firstDate" in the code where you want the date to appear).
Someone else may know more, including why it doesn't work for you, but in the meantime you can try another workaround in case you are stuck. Instead of what I gave you originally, replace the code with this:
Code:
<?php echo date("m-d-Y", $this->startDate); ?>
This time, we are getting the date as a time stamp, which requires a bit more work to format the way you want, so we have to run it through a "date()" function, passing it the format we want ("m-d-Y").
Again, I would try to retype this instead of copying and pasting -- I hear it can cause problems sometimes on this forum.
Re: date display in event_upcoming
That works perfectly for me! Thanks heaps!!
(I also tried typing the first lines instead of copying / pasting, but that did not work either. )