INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to group photos by date of folder/album?  (Read 1455 times)

Pogle

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 86
How to group photos by date of folder/album?
« on: February 01, 2023, 09:36:57 am »

I have a view that groups photos by 'Albuṁ (by date)'. It displays photos grouped by the day they were taken, even when in different folders, such as phone and camera. This worked how I want it but

I've just discovered the resize function with overwrite which is a really quick way of saving space by compressing photos whose resolution is not important. Now the photos I've compressed pop up top the top even though they're located in a folder named after an earlier date. [correction update: the folder structure is YYYY-MM-DD which would sort chronologically but there are two different root folders so it separates them.)

Group by date would work but it includes the time so they're all groups of one.
Any suggestions?
Thanks
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2565
Re: How to group photos by date of folder/album?
« Reply #1 on: February 01, 2023, 11:00:15 am »

Create a new field called [SortDate] to store the proper date for sorting/grouping.
You can automatically populate it with the current import date "=[Import Date]". You can also set that on the Tags After Import dialog so that it's automatically set for new photos.

You can also populate it for all existing files with an expression to extract the date from the folder path, something like this:
=Regex([Filename (path)], /#(\d{4})-(\d+)-(\d+)#/, -1)ConvertDate([R3]/[R2]/[R1])

Note that you need to adjust the red part according to your timezone date format. R3=day, R2=month, R1=year, so "[R3]/[R2]/[R1]" is dd/mm/yyyy.
Logged

Pogle

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 86
Re: How to group photos by date of folder/album?
« Reply #2 on: February 01, 2023, 01:33:03 pm »

Many thanks for that. I fear it will be too much for my weary brain. It's a shame the date fields don't do what they say and just show the date without the time.
Logged

Pogle

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 86
Re: How to group photos by date of folder/album?
« Reply #3 on: February 01, 2023, 04:53:23 pm »

(re previous reply, sorry but if you don't use Regex regularly it's very hard work)
Made some progress with the Expression Language though.
Tools>Options>Library and folders>Manage Library Fields
Add New Field
 - called it Date Taken for Image;Video
 - check Calculated data
Used expression:
formatdate([date,0], %Y-%m-%d)
[OK]
This presents under 'more' in Group by and looks good so far.
Logged

Pogle

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 86
Re: How to group photos by date of folder/album?
« Reply #4 on: February 02, 2023, 10:46:38 am »

OK, one more update.
Grouping by my new custom Date Taken field (based on the date field, above) does what I want except that when I use the resize function the date changes so old photos are displayed at the top. To be expected I suppose.

Album field would be better but it's in dd/mm/yyyy format which doesn't sort well. (where does the value come from, btw? Original create date perhaps?)
So I changed the custom Date Taken field to this:
formatdate(convertdate([album]), %Y-%m-%d)

So now grouping by Date Taken is back in order of original creation date and if I do any bulk resizing the date changes but album doesn't so images continue to be grouped according to the day they were taken.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2565
Re: How to group photos by date of folder/album?
« Reply #5 on: February 02, 2023, 11:40:12 am »

OK, one more update.
Grouping by my new custom Date Taken field (based on the date field, above) does what I want except that when I use the resize function the date changes so old photos are displayed at the top. To be expected I suppose.

The solution I described above takes care of that too, but you didn't do it like that.
Logged

Pogle

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 86
Re: How to group photos by date of folder/album?
« Reply #6 on: February 02, 2023, 03:44:47 pm »

The solution I described above takes care of that too, but you didn't do it like that.
Yeah, the expression language is much easier to get started with. I can imagine adding an 'if album is blank' at some point to use a different date.

Would be cool to have an option on the resize function to maintain original create date and update 'date modified' instead.
Logged
Pages: [1]   Go Up