working version before switching datetime/timestamp to date only