When we report questions we usually use the verb ask instead of say:
“What is the time?” Joe asked Daniel.
Joe asked Daniel what the time was.
When we report questions that have a yes/no answer we use if or whether:
“Would you like some more coffee, Daniel?” said Joe.
Joe asked Daniel if/whether he would like more coffee.
“Have you ever been to Spain?” she asked me.
She asked me if/whether I’d ever been to Spain.
Question Word Questions
When we report questions with question words (what, when, where, etc) we repeat the question words and use a statement word order
“Where do you live?” asked Steven.
Steven asked me where I lived.
“Who were you talking to?” he asked me.
He asked me who I was talking to.
We don’t include the question mark (?) in the reported speech sentence:
x Steven asked me where I lived?
✓ Steven asked me where I lived.
A common mistake is to not change the word order for the reported speech of questions:
x He asked me who was I talking to.
✓ He asked me who I was talking to.