fixes date querie with int when DB stores them as string