sorting numbers of year before and after christ

Started by sinus, September 20, 2023, 01:28:52 PM

Previous topic - Next topic

sinus

Sorry, guys,

a bit a curious and embarrassing question.

How can i sort such a list, the numbers are years.
The years 

before christ
2023
1975
1291
700
12
7
1

after christ

63
650
690
1500 
9000
15000
220 000
1 500 000 (1.5 Mio)
9 000 000
22 000 000 (22 Mio)
65 000 000 (65 Mio)
200 000 000
2 000 000 000 (2 Milliards, hmm, I believe in English maybe billions)
15 000 000 000 (roughly big bang  ;D )

The years from one million could also be written as 1 million instead of 1 000 000, it doesn't matter.
The main question is how to sort a list with the sort options of IMatch so that the years after Christ are sorted normally in ascending order, i.e.:

2023
1795
50

BUT the years after Christ are sorted in ascending order, so:

5
300 000
65 000 000
14 000 000 000

I have tried using underscores and/or letters before the numbers, but as a sadly unmathematical person I am unable to do it.
So before the numbers you can also put any letters or characters to achieve the sorting, it wouldn't matter.

The numbers should simply be written in a field (metadata), i.e. one number for each picture, e.g. dinosaurs with the number 65 000 000 and the foundation of Switzerland with the number 1291 (after Christ).

And this should then be sorted correctly.
Embarrassing, but I can't manage it at the moment.  :-[

Has anyone a good idea?




Best wishes from Switzerland! :-)
Markus

Mario

One easy way, using a standard metadata tag would be to mark the  BC years with - (minus).
In my case, I've used the headline.
Then I've created a sort profile which sorts by headline with the option "Treat as number" enabled.
The thumbnail panels show the headline at the top.
You could use a variable in a custom template to strip the leading - if it disturbs you.

Image1.jpg

Image2.jpg

Another way would be to probably use a numeric Attribute, again using a negative number for BC.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Hmmm, Mario, 

thanks a lot. I think, I have tried this, but maybe not "treat as number". 
As soon as I have more time, I will check this.

Sounds promising, thanks for try this.  :)
Best wishes from Switzerland! :-)
Markus

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thrinn

Quote from: sinus on September 20, 2023, 05:18:01 PMI think, I have tried this, but maybe not "treat as number".
"Treat as number" is essential in this case. Otherwise, even without additional "complexity" involving negative numbers, you will get a sequence like this:
1
10
100
2
20
200

But following Mario's suggestion, it will work. But be careful to enter the numbers without any spaces, commas, or other separators: 1 000 000 will not be recognized as a number, but 1000000 will.
Thorsten
Win 10 / 64, IMatch 2018, IMA

sinus

Cool, thanks both of you!

I will try this, hopefully tomorrow, and I am sure, it works with your suggestions. 
And yep, I will be carefully with spaces and so on.  :)
Best wishes from Switzerland! :-)
Markus

sinus

Once again thanks!

I tried it and it works perfectly!  :)
How could I not thought about this.  ::)

Well, because I have a special filenaming (and no reason to change), I decided to finally use the filename for this.
First, I have not a lot of images before Christ. 
And it fits perfectly into my filename-system, even if it looks a bit curious. 
There I found even this variable:

File Name(numeric)

what is for sure the same, like you both suggested.

It works super, maybe you can see this in my attachements, simply for your information. 
I use D&P for this and there I can use also the edited sorting. Cool. 

The attachement with the D&P-example is of course only for testing, not finished.

The calculations for years works perfectly until the year 1601. 
Before this it works not more, we have spoken about the special problems with years (gregorian/juilan...), this is a problem of course not from IMatch, but simply in the computer-aerea. 

But I am sure, I will also solve this with help of IMatch. So this is for sure not an issue.
Just for your info, have a good day!  :)




Best wishes from Switzerland! :-)
Markus