trim data using date