date and time from image -> kml

Started by biedubbeljoe, July 08, 2010, 05:01:21 PM

Previous topic - Next topic

biedubbeljoe

Hi,

I have the next command: exiftool -datetimeoriginal -r -k -if "$gpslatitude" -p kml.fmt -d %Y-%m-%dT%H:%M:%SZ %~p0 > output.kml

What do I need to enter in my kml.fmt to show the created date and time of an image?
current I have: #[BODY]      <datetimeoriginal>$datetimeoriginal</datetimeoriginal>
Which shows:       <datetimeoriginal>m-H:SZ</datetimeoriginal>
in my output.kml

Any help would be appreciated.

Phil Harvey

Very odd.  What you have done should work as long as DateTimeOriginal is valid in the source files.  When I try this on the test GPS file included with the full ExifTool distribution (t/images/GPS.jpg), I get this in the output KML file:

<datetimeoriginal>2002-07-13T15:58:28Z</datetimeoriginal>

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).