Unix or Linux get print job completion time and history

I want to know how long it took each job to complete in my sbatch outputs. How do I do that?

You can always use the lpstat command:

lpstat -W completed
sudo lpstat -W completed

Another option is to visit the following urls

http://localhost:631/admin

And look for Jobs tab.