I'm in the process of updating the wiki on these, and there are some recent not-published changes. Hang in there for more info...
Re: FormatDate(ConvertDate(3/6/2012), decade))
There's an extraneous trailing parenthesis, and you'd need to quote the / chars. Instead, use this to simplify:
FormatDate(ConvertDate(3-6-2012), decade)
ConvertDate() takes human readable date strings, and converts them to an internal MC representation.
FormatDate() converts an internal MC date representation into a human readable format, with the desired formatting.
You want to grab the date portion from the filename, and send it to ConvertDate so that MC knows it is a date. Let's start with grabbing the date portion. Since ConvertDate needs a separator between the year, month, and day, let's do that:
Regex([Filename (name)], /#^(\d{4})(\d{2})(\d{2})#/, -1)[R1]-[R2]-[R3])
This outputs the date with a dash between year, month, and day. Now from something like 20110522, we have from 2011-05-22. This can be handed to ConvertDate(), so let's test:
ConvertDate(2011-05-22)
returns 40685, an internal MC date representation. So here's the whole thing:
ConvertDate(Regex([Filename (name)], /#^(\d{4})(\d{2})(\d{2})#/, -1)[R1]-[R2]-[R3])
You can use this expression to assign to a Date field.