Page 1 of 1

Setting the last day of a month during rename

PostPosted: Sun Jun 12, 2016 5:04 am
by pja
I am renaming some bank statements and wish to include the statement date in the filename.
The statement contains only the month and year. Each statement ends on the last day of the month.

Problem: some months have 30 days, some 31 days and Feb has 28 days most years.

Question: Is there a way to set the date to always be the last day of the month?

Re: Setting the last day of a month during rename

PostPosted: Sun Jun 12, 2016 8:12 am
by Dave61
pja wrote:I am renaming some bank statements and wish to include the statement date in the filename.
The statement contains only the month and year. Each statement ends on the last day of the month.

Problem: some months have 30 days, some 31 days and Feb has 28 days most years.

Question: Is there a way to set the date to always be the last day of the month?

Can you test the month:
- if Jan, Mar, etc then day = 31
- if Apr, Jun, etc then day = 30
- if … a bit more complicated

Re: Setting the last day of a month during rename

PostPosted: Fri Mar 24, 2017 8:25 am
by andre.ct
Does anyone have an answer to this problem?
I can extract the Month and Year but in the file rename, I want to insert the last day of that month.

Re: Setting the last day of a month during rename

PostPosted: Fri Mar 24, 2017 10:01 am
by Mr_Noodle
You'll probably need to use a script as there's not built-in way to do something like this (at least not without having something like a rule per day of the month and using a different date adjustment for each one).