below you find "Similar threads".
It has been discussed many times... And i find the datasheet includes all informations.
And you may find plenty of code and descripton on how to use DS1307.
Also if you want code you should at least define what language you need.
***
Please read all the informations.
Write your code - or try at least. If you encounter any problems please give all needed informarion (schematic, code, additional informations) and a detailed error description.