Is Margin permissible if you close position before end of day so 0 interest charged?

Salaam,

If I use margin for a day trade, is that permissible so long as I close by position before 4pm so no interest is charged? i.e. no overnight holding