Formula 1 for integration by parts:

Formula 2 for integration by parts:

If both the formulae are equivalent, someone kindly show an example as when (for which functions) to use the first formula, and when to use the second?
To make my question even more clear, I am trying to integrate $$sin(wt)*e^{(-jwt)}dt$$ over limits of $-\pi$ to $\pi$. The two formulae yields different results.
So which would be the right formula to use here? Should $e^{(-jwt)}$ be considered as $dv$ or $v$? If we must consider it as $dv$ then why not $v$?
When I use formula 2 I get:
$$\int_{-\pi}^\pi \sin{(\omega t)}e^{-j\omega t}dt=\frac{-e^{-\pi j \omega}\cos(\pi \omega)-je^{-\pi j \omega}\sin(\pi \omega)+e^{\pi j \omega}\cos(\pi \omega)-je^{\pi j \omega}\sin(\pi \omega)}{\omega(j^2+1)} $$
When I use formula 1 I get:
$$\int_{-\pi}^\pi \sin{(\omega t)}e^{-j\omega t}dt=(\sin{(\omega t)}\int_{-\pi}^\pi e^{-j\omega t}dt)-(\int_{-\pi}^\pi \cos(\omega t)dt\left(\int_{-\pi}^\pi e^{-j\omega t}dt\right))=-\frac{\sin(\omega t)(e^{-\pi j \omega}-e^{\pi j \omega})}{j\omega}+\frac{2\sin(\omega t)(e^{-\pi j \omega}-e^{\pi j \omega})}{j\omega^2}$$
Those two formulas are saying the exact same thing, but are referring to a different thing with the name $v$. In one of them, $v$ is the integral of the thing that the other one calls $v$.
So just for example, we might want to calculate $$ I = \int_0^\pi\mathrm dx~x~\cos(x).$$ We decide that we want to raise (integrate, antidifferentiate) the cosine and lower (differentiate) $x$, because we want a simpler expression and we know that we can integrate cosine without the result exploding in complexity.
Both expressions agree that $u=x$, and both expressions agree that we are going to integrate the cosine, they just differ in the nomenclature -- the question of what they call $v$. According to your first expression, we would state that $v = \cos(x)$, it is the thing to be integrated. Then we compute its antiderivative $V = \int \mathrm dx~\cos(x) = \sin(x),$ and then we can compute $$ I = x~\sin(x)\big|_0^\pi - \int_0^\pi \mathrm dx~\sin(x). $$ According to the second expression, we would state that $\mathrm dv = \cos(x)~ \mathrm dx$, notice the differentials appearing. And then we would integrate this to discover that $v(x) = \sin(x).$ So in the previous expression we said that $v$ was $\cos(x)$ and then we had to introduce a notation $V$ for its antiderivative, but here we have instead said that $\mathrm dv/\mathrm dx$ is $\cos(x)$ and then the antiderivative is just $v$. But the second approach gets to the exact same result immediately after, because $uv$ is still $x \sin(x)$ while $v~\mathrm du$ is $\sin(x)~\mathrm dx.$ So you just get exactly the same expression, $$ I = x~\sin(x)\big|_0^\pi - \int_0^\pi \mathrm dx~\sin(x). $$ Because the only difference between these two expressions is how they name things, you should just use whichever one helps you make fewer errors. For me that's the second one, so writing $\mathrm dv = \cos(x) \mathrm dx$ really helps me to not forget to integrate that expression, where if I were in a hurry with the first expression I might get confused and think "OK so the answer is $x \cos(x) - \int \sin(x)\mathrm dx$ or so, and forget to integrate one or the other of the $v$ terms.
If you have gotten different answers for doing a practical problem with these two paths, then that is great news. Figure out which answer was correct (for example by differentiating both indefinite integrals, and confirming that you get back to the right starting point), then only use the method that worked for you and forget the other method. You will not miss anything if you do it the way that works for you and ignore the other way.