How to extract date and time?

Started by sunbirdmedia, September 20, 2012, 03:53:46 AM

Previous topic - Next topic

sunbirdmedia

Hello,

I've figured out how to extract metadata from my images into a .csv file, but I need separate values for date and time and DateTimeOriginal extracts date and time into the same cell. Is there a way to extract them as separate values, or a way to separate them after the fact?

Thank you!
Jen

Phil Harvey

Hi Jen,

This can be done with a user-defined Composite tag.  See the sample config file for examples.  The ValueConv's to do this are:

    ValueConv => '$val =~ s/ .*//; $val',  # isolate date from date/time value

    ValueConv => '$val =~ s/.* //; $val',  # isolate time from date/time value

- 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 ($).