Formatting Numeric Variables

Started by Mario, August 26, 2013, 07:20:52 PM

Previous topic - Next topic

Mario

When I use the variable

{File.MD.Composite\ShutterSpeed\ShutterSpeed\0}

a 1/60 shutter speed will display as 0.02.

Shutter speed is specified as a numeric variable. Variables always use the native format, which gives you a floating point number in this case. IMatch, also by default, formats numerical values according to the numerical formatting settings for the current user (as set in Windows Control Panel). This is the reason why IMatch displays the variable as a floating point number with two decimal places.

Fortunately, variables in IMatch allow you to override this default behavior, e.g. by switching to the formatted value as delivered by ExifTool or by specifying the number of decimal places via the numformat formatting option.

{File.MD.Composite\ShutterSpeed\ShutterSpeed\0|value:formatted}

returns 1/60

{File.MD.Composite\ShutterSpeed\ShutterSpeed\0|numformat:float,0,4}

returns 0.0167

See the Variables topic in the help for details.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook