Added in datetime checking