You can calculate kilojoules from kilowatts and seconds, but you can't convert kilowatts to kilojoules since kilowatt and kilojoule units represent different quantities.
The energy E in kilojoules (kJ) is equal to the power P in kilowatts (kW), times the time period t in seconds (s):
E(kJ) = P(kW) × t(s)
kilojoules = kilowatts × seconds
kJ = kW×s
What is the energy consumption of an electrical circuit that has power consumption of 3 kilowatts for time duration of 3 seconds?
E(kJ) = 3kW × 3s = 9kJ