Depends on the finished size of the plant you want. For a mature plant I wouldn't sow after the end of June but if your growing autos then it doesn't really matter with in reason.
july is fine, the plant wont get so big before flowering but ive had an oz or so of a plant sowed in july. try and get them off to a good start so that they grow vigorously .