Date conversion and buildFormula
Close to final draft of knitr file