Closed (fixed)
Project:
Date
Version:
6.x-2.4
Component:
Date CCK Field
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2009 at 08:40 UTC
Updated:
1 Jun 2011 at 02:43 UTC
Hi
I suspect I'm just being dense here, and I apologise if so.
I'm simply trying to return the timestamp for a Date CCK field in a hook_nodeapi() function.
My field is called field_need_date_value.
I've tried:
$date = strtotime($node->content['field_need_date_value'];
and
$date = strtotime($node->field_need_date_value);
and
$date = strtotime($node->field_need_date_value[0]['view'];
but I can't get any of these to work.....
Thanks
Comments
Comment #1
glennnz commentedSolved
It's:
Comment #2
arlinsandbulte commentedComment #4
RobW commentedYou can also create a custom date format with U as the format parameter string, and then set your field to your custom format in the manage display tab. This returns a unix timestamp.