I'm not sure what you mean by "it's not handling the datefield correctly." Just looking at the code you provided, I would presume that it's not performing the logic the way you want. It should be evaulating "01.01.2014" like it would letters--one number at a time. (e.g., "flask" > "flash" because "k...