Format date in $node object

Created on 19 May 2009, about 15 years ago
Updated 16 May 2024, about 1 month ago

I have a Date CCK field which I'd like to display in a custom format, however, as I'm trying to get it from the $node object, I can't seem to change the format...

$node->field_my_date[0]['value'] outputs 2009-05-19T00:00:00. I therefore can't use format_date() as I otherwise would.
I've tried changing the format on the CCK Display Fields page, and changing the Default Display in the Date field's CCK settings, but neither seem to change the format of the date as shown in the $node object...

Is there a way I can either format the current display of the date, or change it to a timestamp so I can use format_date() on it?

πŸ’¬ Support request
Status

Fixed

Version

2.0

Component

Date CCK Field

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.69.0 2024