First of all , we should calculate the acceleration acquired by the body.
From Newton's second law of motion, we can write,. F=ma ,so a=F/m
Putting the values, a=6N/1kg=6m/s^2
Now applying,
S=ut+1/2 at^2
Putting the values of S and a in the equation,
We get,
12=1/2 ×6 ×t^2 ,
12=3t^2,
or t^2=4
Hence,
t=√4 = 2 second ( time can never be negative).