Problem with timeframe setting in formula

Did you read “How to use this site”? Really pasting code without proper code tags makes it ill-formatted.