Hi,
As Mr Noodle said you can use the "Contents" and "Contain Match" conditions to what you want to do. I recommend you look at the examples outlined in the forum as well as the Hazel User Guide for the best instructions. At a higher level, if you can identify text that is consistently and uniquely used in documents you should be able to "match" this text in the condition of your rule, creating "variables" that are then passed from the condition to the action. So you can extract a date from the condition and use it in the action to rename the file.
In my personal experience this works well if the text layer in the document matches what we actually see in the file. You can build up a condition that matches multiple items. So you can ID your bank name, your account number, a start and end date.
When my documents are scanned and OCR'ed I find that the text layer does not always reflect what I read in the file. This causes the file renaming to be frustratingly finicky, for me. I have not yet had the chance to see if Mr. Noodle's new version of Hazel is better than the OCR that comes from my ScanSnap scanner (which I believe uses a version of the Abbyy OCR engine).
Hope this help!