Add datetime/2 to query API