Fetching a record within a time range in custom function?

Fetching a record within a time range in custom function?

Hi, 
So I have to write a custom function where I need to fetch all leads created after 7 pm and before 10 am the next day.  But the search record does not have any operator which can make such a fetch. Creation time is stored in the created_at field.  Is there any workaround for this ?