What came first dinosaurs or turtles?

Fossilised remains of "turtles" have been found dating back to the Cretaceous period in Earth's history (this period ended around 65 million years ago).... However Dinosaurs have been on the planet for a MUCH greater length of time, it is debated slightly when the first dinosaurs appear but it is alleged to be over 200 million years ago.

Therefore dinosaurs would have become before turtles