what is the formula for charging a capacitor with constant current?
Normally I would let you go and look as this is not a hard question to solve, but as I am feeling generous here is how we get there:

From fundamentals, we know that \$Q =CV\$

If we take the derivative with respect to time (remembering that \$I = \frac {Q} {T}\$) we yield

\$i = C\frac {dv} {dt}\$

Rearranging, we find that \$\frac {i} {C} = \frac {dv} {dt}\$

Therefore charging a capacitor from a constant current yields a linear ramp (up to the compliance of the current source).

I will leave finding the solution in terms of time versus some voltage to you.