INTERACT FORUM

Please login or register.

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

Author Topic: Month number, not name  (Read 1023 times)

justsomeguy

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 525
Month number, not name
« on: September 30, 2019, 12:06:59 am »

Is there a way to get month number instead of month name?
I want to organize all my photos into year-month folders based on when the photo was taken. The problem I have is [Month] gives me for example September but I'm trying to get 09 instead. So all photos taken in Sept 2019 should be in a folder like ...\photos\2019-09\Photo.jpg
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Month number, not name
« Reply #1 on: September 30, 2019, 01:03:03 am »

Absolutely.  Take a look at the FormatDate function...

https://wiki.jriver.com/index.php/Date_and_Time_Functions#FormatDate

Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Month number, not name
« Reply #2 on: September 30, 2019, 01:04:29 am »

Oh dear, Wer beat me again. Cool.  8)


"Date Taken" is generally put into the [Date] field in MC. You can format that any way you want using the FormatDate() function.

For your requirement: Formatdate([Date,0], yyyy-MM, )

These days, for new image imports, MC should set the [Album] field to the Date Taken, which is also put into the [Date] field, for all formats I believe. Just take note if that happens. That is used for the default Albums View in the Images section of the Navigation Bar. I don't think the [Album] field can be formatted with the FormatDate() function... No, it can't, as it is just a text (string) representation of the [Date] value. Raw date values are decimal numbers.

Regardless, if your View is using the [Date] field to group files, that can be formatted with the FormatDate() function.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Month number, not name
« Reply #3 on: September 30, 2019, 01:38:55 am »

Rod, have you ever heard the expression "Teach a man to fish..."?

Since you're all over this and giving him everything so there's nothing he could need to look up, I can only conclude this guy is an Australian.   :P Do you know them all or do you just have some sixth sense for them?

If I just handed one of my little squirrels a nut every time they chittered at me, would they ever learn to bury them for themselves??

Justsomeguy, despite Roderick giving you a workable expression, I would still encourage you to read the link.  It's always good to learn things and you may discover an alternate possibility you like even better.  Good luck!
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Month number, not name
« Reply #4 on: September 30, 2019, 01:57:20 am »

If he is Australian, he is out in a boat West of Australia.

I have been looking at image dates of late, so I shared. Some of what I shared is undocumented, except for a brief note in the Release Notes, which doesn't have context. Many people who ask such a basic question after being on the forum for so long need just a little more of a push. Particularly those who have been helpful in the past, as JustSomeGuy has. He will need to read the Wiki and experiment, believe me. I haven't asked where he is trying to apply the expression, and its use needs context.

Not to mention, you have been complaining about the lack of and quality of documentation recently, so... I document.

Carry on.  ;D
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

justsomeguy

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 525
Re: Month number, not name
« Reply #5 on: October 01, 2019, 03:08:12 am »

I'm actually pretty good at fishing most of the time. I usually do check the wiki first if I can't just figure it out on my own but I was having a lazy American moment I guess. And yes for as long as I've been using Media Center (even before it was called Media Center) it was a very basic question to ask.

Anyhow thank you Wer for pointing me in the right direction and Roderick for catching, cleaning, cooking, and serving me the fish.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9140
Re: Month number, not name
« Reply #6 on: October 01, 2019, 04:04:57 am »

 :D

Love you guys... (In a not gay way :P)

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Month number, not name
« Reply #7 on: October 01, 2019, 05:43:19 am »

 :D :D :D    8)
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Month number, not name
« Reply #8 on: October 01, 2019, 01:06:01 pm »

he is out in a boat West of Australia.

Isn't that really, pretty much everyone;D
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Month number, not name
« Reply #9 on: October 01, 2019, 01:47:02 pm »

No.  Squirrels live on land.

With rare exceptions...

Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Month number, not name
« Reply #10 on: October 01, 2019, 05:46:53 pm »

Isn't that really, pretty much everyone;D

Yep. We get the sun first, every day. New Zealand doesn't count... or Russia, because they don't see the sun. We are going to time travel this weekend forward an hour as well, just to get more sun.

That squirrel is cute. I would probably exchange our possums for your squirrels if I was allowed. Possums aren't so cute.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

Scobie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 740
  • Looking Busy
Re: Month number, not name
« Reply #11 on: October 01, 2019, 06:30:17 pm »

Code: [Select]
Isn't that really, pretty much everyone?
Steady on Glynor, you could fit the state of Maine into my suburb, and have room for Connecticut.

Logged
Pages: [1]   Go Up