Hi there,
I’m just playing around with the Exif plugin and it seems to be working fine.
However, I wonder if anyone can tell me of a way to change the formatting of the {date_taken} value?
At the moment, for a sample image, it displays as: 2008:04:12 16:03:59
But can this be changed to just show the date only in the format of dd/mm/yy (instead of yyyy:mm:dd) with no time? So I want 12/04/08 if possible?
Thanks for any advice,
Stephen
I do it like this: (PHP needs to be on for the template (output))
<div class="captureTime">
<?
$exifString = "{datetimedigitized}";
$exifPieces = explode(":", $exifString);
$newExifString = $exifPieces[0] . "-" . $exifPieces[1] . "-" . $exifPieces[2] . ":" .
$exifPieces[3] . ":" . $exifPieces[4];
$exifTimestamp = strtotime($newExifString);
echo date('F j, Y', $exifTimestamp);
?>
</div>
I do it like this: (PHP needs to be on for the template (output))<div class="captureTime"> <? $exifString = "{datetimedigitized}"; $exifPieces = explode(":", $exifString); $newExifString = $exifPieces[0] . "-" . $exifPieces[1] . "-" . $exifPieces[2] . ":" . $exifPieces[3] . ":" . $exifPieces[4]; $exifTimestamp = strtotime($newExifString); echo date('F j, Y', $exifTimestamp); ?> </div>
Hi Jeremy,
Thanks for this, much appreciated! I’ll give it a try.
Thanks,
Stephen
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.