The folks who literally wrote the book(s) on the P38 reside here and would be happy to give you a hand. If you post the serial number and a description of the gun, you should get your answer quickly. Good luck.
Generally speaking, and with some exceptions, it is pretty straightforward to correlate postwar P38 serial numbers with the date of manufacture, which began in 1957 @ s/n 1001 and ended in the early 1990s @ around s/n 475,000. A few steel-framed guns were in the s/n 500,000 range. Often the slide is actually date-stamped, which helps.
HOWEVER, this is meaningful only on guns believed to be original.
The problem arises in the ex-Bundeswehr guns, many of which were rebuilt, with major parts such as barrels, slides or even frames with anachronous characteristics replaced, and renumbered to match. This makes the problem more complex. If one wants to know when "it" was "manufactured" one first must define terms. Are we talking about the whole gun, or some specific portion of it? Or the date of original manufacture, or when rebuilt, or when some major component was manufactured? With some difficulty rebuild markings can be deciphered and the replaced parts more or less dated, but it can be a puzzle, and with some guns rebuilt more than once, it is practically meaningless, as sometimes the only thing left that is original is the s/n.
The bottom line is that, where s/ns are concerned, a knowledge of when certain manufacturing changes were made is vital. Nothing can be taken for granted; each gun must be carefully examined.