How calculate three phase kilowatt hour from time sampled data of voltage and current of each phase
It depends on your load. If you have a symmetrical load which sinks a sinusoidal current and power changes relatively slow, then what you're doing works. You can calculate the power at each sample by:

$$P = U_1 \cdot I_1 + U_2 \cdot I_2 + U_3 \cdot I_3$$

Sum all samples up and you will get the desired energy \$W\$. For example with 50 samples/s:

$$W = \frac{\Sigma P}{50} ~~[Ws]$$

But if your current is not such a nice sine and your power consumption changes fast (within 1 period) than you need much more samples than 50/s (as Andy aka said).