I have a smart rule which scans the name of a markdown file. The file name contains the date in the format “Wednesday 2 June 2021”. I have a custom metadata date field (date only) in which I should like to put that date—but in the format 02/06/2021. I can’t seem to do that.
The handbook
The handbook says, on page 228:
Date:Similar to String parameter, use the desired format of the Document Date placeholder to represent the captured string in subsequent actions.
What I seem incapable of working out is how to change the date format from the captured to the “desired format”. Am I correct in thinking <shudder> that this is something for scripting (although the handbook appears to hint at something simpler)?
The scan actions do not expect a date format but either a prefix and/or suffix. E.g. if the date follows always the string “DATE:”, then this DATE:* should work.
Thanks for the reply. I seem to be able to extract what appears to be the date with no problem. It’s the format in the custom metadata date field that’s the problem.
Maybe I should explain a little more. Take the following named files:
Tuesday 1 June 2021.md
Monday 31 May 2021.md
Thursday 31 December 2020.md