reference datetime correctly