ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: biedubbeljoe on July 08, 2010, 05:01:21 PM

Title: date and time from image -> kml
Post by: biedubbeljoe on July 08, 2010, 05:01:21 PM
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.
Title: Re: date and time from image -> kml
Post by: Phil Harvey on July 09, 2010, 07:37:29 AM
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