Closed (fixed)
Project:
Date
Version:
5.x-1.8
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Jan 2008 at 09:33 UTC
Updated:
19 Sep 2008 at 13:42 UTC
I am trying to get my template to print out a nicely formatted historical date from a CCK date field (with both from and to dates). I am using ADOdb. Everything is rather easy if I want to just use the default combination of the "from" and "to" dates; I can just use print $node->field_born[0]['view']
However, if I want to put the "from" date in a table cell that is separate from the "to" table cell, I can't seem to get things to work. So far, my most promising attempt was this:
$formatted_date = date_format_date($node->field_born[0][value], 'custom', 'M j, Y');
print $formatted_date However, this only produces an ugly timestamp, like so: 1819-08-0100:00:00.
Any ideas how to crack this? I must be missing something here. Thanks in advance for any help!
Comments
Comment #1
karens commentedI'm not making changes to the 5.1 version. I'm officially recommending you move to the 5.2 version now. If you have problems in that version you can check for existing issues or add new ones. Feature requests are now getting posted to the D6 version to be back-ported to 5.2.
In the 5.2 version, look at theme.inc for theme_date_display_combination() for ideas on what info is available when you override the theme.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.