modified by wangliang for date format