How can I find the time at which the diode charges the capacitor every cycle(half wave rectifier)
[Wrong answer]
the capacitor never charges completely, we often calculate the time at which the capacitor will charge to 63% of Vs 

First have the charging formula:

\begin{eqnarray*}
V(t)=V1(1- e^{\frac{-t}{RC}})
\end{eqnarray*}







simulate this circuit &ndash; Schematic created using CircuitLab

\begin{equation}
V(RC)=V1(1- e^{-1})= 0.63\times V1\\
\end{equation}

So now you have your time constant in seconds which is: RC

you still must verifiy a condition on RC, it should be smaller than the priod of your signal