Assuming $a(t)=a_0\sin(\omega t)$, $v(0)=0$ and $x(0)=0$.
I hope you know about basic relation between position, velocity and acceleration. They are derivatives of the proceeding one.
I went on calculating like so:
$$\require{cancel} (\mathbf{1})\ \ \ \ \ \ \ \ v(t)=\int a_0 \sin(u)\frac{du}{\omega}=\frac{a_0}{\omega}\cdot-\cos(\omega t)+\cancelto{0}{C}=\color{blue}{-\frac{a_0}{\omega}\cos(\omega t)}$$
$$(\mathbf{2})\ \ \ \ \ \ \ \ v(t)=\int_0^ta_0 \sin(\omega t')dt'=a_0\int_0^t\sin(u)\frac{du}{\omega}=\frac{a_0}{\omega}\left[-\cos(\omega t)\cancelto{+1}{-(-\cos(0)})\right]$$
$$\implies v(t)=\color{red}{\frac{a_0}{\omega}(1-\cos(\omega t))}$$
$$\color{red}{\frac{a_0}{\omega}(1-\cos(\omega t))}\neq\color{blue}{-\frac{a_0}{\omega}\cos(\omega t)}$$
On the first line you get $$ v(t)=\frac{a_0}{\omega}\cdot (-\cos(\omega \cdot t))+C $$ then by putting $t=0$, you have $v(0)=0$ giving $$ \begin{align} &0=\frac{a_0}{\omega}\cdot (-\cos(\omega \cdot 0))+C \\\\&0=-\frac{a_0}{\omega}+C \\\\&C=\frac{a_0}{\omega}. \end{align} $$
Then there is no more contradiction with your second computation.