SELECT cat, "Created at", CAST("Created at" AS datetime) AS date WHERE date between 01/01/2017 and 31/12/2017 FROM @t