As already mentioned by Solution 1, there is no timestamp for pure JPEG files. But additional information may be present in application specific meta data (e.g. EXIF, IPTC). So you must parse the header for APPn markers, locate the payload, and get the information out of it.
As a starting point to parse the header see the article
Extracting IPTC header information from JPEG images[
^].