"Give me the knife!"
Translation:Gib mir das Messer!
For the knife to become dative, it would have to be the direct object in the sentence. I can't think of many sensical sentences, but here's an example:
Ich gebe dem Messer eine Tomate.
The knife is dative in this sentence because it is the one receiving the object.
Subject- Ich Verb- gebe Indirect object- dem Messer Direct object- eine Tomate
If you want to learn more about how to determine word order, I recommend going here: https://www.germanwithantrim.com/single-post/2016/1/15/German-Word-Order-Direct-Indirect-Objects