Fixing bug with toObject methods on DATE, TIME and TIMESTAMP PData types...

.... Adding test case for the same