I am trying to display the results of two fields in a single uninterrupted string. In one field (using the entry date calendar) I have the time of a game, in the second string I have the time zone (e.g., EDT, etc.) since these are going to be different than my time zone when I created the entry.
If I do it as a table with the two fields in a row, then because of the size of the cells in the second column elsewhere in the table, the second field (with the time zone) prints out too far away from the first (the time of the game) to read nicely on the page. E.g.,
<tr>
<th>Game Time:</th><td>{game_date format="%g:%i%A"} </td><td>{time_zone_primary}</td>
</tr>
{if game_time_local}<tr>
<th>Local Game Time:</th><td>{game_time_local format="%g:%i%A"}</td>{if time_zone_local}<td>{time_zone_local}</td>{/if}
</tr>
{/if}[
gets you “3:00PM EDT”
I’ve tried using &,|, + and even the direction CONCAT, and all it does is add an extra simple to the result.
What’s weird (to me) is that elsewhere, I’ve been able to get other fields to display pretty much like I want it here. E.g.,
{title} - {game_date}
with the date format, gives me “Phoenix @ Los Angeles - Saturday, July 11, 2009” very easily, but when I try to do the same thing with the game time and timezone fields, it gives:
“3:00PM
EDT”
which just doesn’t do it for me.
Thanks
If you were here, silenz, I would hug you! Can’t tell you how much time I’ve spent trying to gerrymander those doggoned time zones around. Now I might not even need the table.
Question: Should I leave the date field in HTML, since I may want to calculate off it, or select portions (such as just the date or just the time)? Or should I just set everything to “none” on formatting?
Thank you so much. Now I might not even need the table.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.