Printing date with custom format I want to print "event_info_date" Date (Unix timestamp) field with custom format in node.tpl.php.

I'm using this code:

&lt;?php print date("Y/m/d h:i:s", $node-&gt;event_info_date['und'][0]['value']); ?&gt;


And it prints: 1970/01/01 01:00:00, but it isn't value from my field.

I've also tried this:

&lt;?php print format_date($node-&gt;event_info_date['und'][0]['value'], 'custom', 'Y/m/d h:i:s'); ?&gt;


But it doesn't print anything. Any ideas?
Try this:

print date("Y/m/d h:i:s", strtotime($node->event_info_date['und'][0]['value']));

Hope this will help you.