fix duration, add ability to retrieve duration from a date field