$regexp($regexp(%_file_create_date%,'(\d+)\.(\d+)\.(\d+)','0000$3-00$2-00$1'),'0*(\d{4})-0*(\d{2})-0*(\d{2})','$1-$2-$3') How do I strip the "-" out of this string to output 20240311?
See e.g. here:
AFAIK the output of
%_file_create_date%
depends on your local Windows operating system language and settings.
In my German Windows 10, the unformatted content of the create date looks like this:
31.03.2024
also known as
DD.MM.YYYY
The regular expression to change it to 20240331 (without any dividing characters) would look like this
$regexp(%_file_create_date%,'(\d+)\.(\d+)\.(\d+)','$3$2$1')
You have to adjust the matching (\d+)\.(\d+)\.(\d+) part to the format you use in your local Windows.
The above regular expression only works for a date divided by dots and where DD is the first match, MM the second match and YYYY the third match.
If the %_file_create_date% should simply be stripped from its hyphens, then try this
Format String: $replace(%_file_create_date%,-,)
It does not rearrange the sequence of data parts, though, as that depends on your local unit settings.