added some date utilities
added query by example function