working date switching and preserving dates content