Deriving Compound Interest for Odd Duration such as in Days

What formula should be used to calculate the Maturity Value for an Odd Duration.?

Ex: -

Principal ( P ) - 10,000
Int ( R )- 8%
Compounding Freq ( m )- Quarterly ( 4 )
Duration ( n ) - 390 Days..

I have checked most sites and also reffered some Finance Mgmnt books, but they are focussing more on whole no of years or half-years, but in real life one can take a Fixed Deposit in any Bank for just 50 days or 73 days..

Then how does one calculate the Maturity value in such cases?

Warm Regards

e4excel