When did I say that?

Hello, I’m very new to Japanese grammar, but I’m trying to practice. I wanted to basically say the sentence “when did I say that?”

The closest I’ve come up with is “私はそれのいつを言ってましたか?”

But I am almost positive this isn’t correct, or if it is it’s very weird way of saying it.
Could anyone tell me a better or correct way of saying this sentence?



So “the thing you’re saying” is the object, so that should get を. それをいつ言いましたか。

And preferably you don’t mention the subject if it’s clear from context, and usually it is, if you’re talking about yourself.

Other options include: いつそう言いましたか。それはいつ言いましたか。私がそう言ったのはいつだった(っけ)。