Is it fine to write
during the second half of 4th century B.C.
or is it preferable to write
during the second half of the 4th century B.C.
This question was already answered here.
the case being: ordinal numbers as adjectives, as with your inquiry.
you may also find your answer in this exercise, the answers are pretty well detailed.