Added datetime support. Implementation could be better...