#1 : 05/03-24 22:44 Shan Jay
Posts: 8
|
I have a bunch of folders named like this;
client john tech support_April-01-2022_23-47-24 hr susie in house_January-26-2022_00-47-20 the name at the beginning before the date can be varying in length so that needs to be taken into consideration. client john tech support_April-01-2022_23-47-24 hr susie in house_January-26-2022_00-47-20 I want the name of the months, converted to their number in the calendar and for the format to change from MM-DD-YYYY to YYYY-MM-DD So this; client john tech support_April-01-2022_23-47-24 hr susie in house_January-26-2022_00-47-20 should be this; client john tech support_2022-04-01_23-47-24 hr susie in house_January_2022-01-26_00-47-20 time stamps should remain as is just the date needs to change from the month being described as a word to being given a number and the sort order changed. Thanks for any help! |
#2 : 06/03-24 00:19 Delta Foxtrot
Posts: 285
|
Reply to #1:
Hi Shan, Not a problem. Off the top of my head I'd say just add all the permutations of text-month to the LIST REPLACE method , then a simple regex replace; however, I'm sure someone who's actually smart will come along and suggest something more elegant. :) New method LIST REPLACE (nothing checked; apply to Name) Add all the text dates in the left column followed by the number you want to see (April -> 04). (be sure to add the long/full versions before the shorter ones if you have the short ones in the folder names) New method REPLACE (1st Occurrence; Case sensitive NO; Use regular expressions YES; apply to Name) Replace: ([^_]*_)(\d\d)\-(\d\d)\-(\d{4}) With: $1$4-$2-$3 Coffee break. Cheers! DF |
#3 : 07/03-24 08:51 Shan Jay
Posts: 8
|
Reply to #2:
DF, Thank you so much! Following your instructions, that worked perfectly! Thanks for the help, much appreciated :) |