Minor issues fixed

Added a IdQuery interface

DateTime will stay datetime instead of parsed to a timestamp