Struggling with formatting of aperture number

Started by hanswkraus, May 28, 2025, 07:19:12 PM

Previous topic - Next topic

hanswkraus

Hi, for the renamer I want to format the aperture from variable {File.MD.aperture} as two digits, decimal point and one digit, with leading 0 if necessary. The variable has no leading 0. I want:
5.6 => 05.6
11.0 => 11.0
and so on. And as decimal separator a point, even as my language is german with a comma. I tried:
{File.MD.aperture|numformat:float,04,1} delivered 5,6
{File.MD.aperture|cast:real;math:div,10,1|numformat:float,04,1} delivered 5,6
In both cases I got no leading 0 or leading blanks (even when I tried numformat:float,08,1 and numformat:float,8,1)
Is there a possibility to achieve what I want?
Regards, Hans

Mario

It's a bug. The formatting was not parsed correctly in this case (float cast).
I have this fixed for the next regular release.