Husseinsalah:
thanks for reply
but rtc not available right now, i would like don this by suitable code
As has been mentioned, you cannot do this by code alone.
The Arduino running code, has no way of knowing how accurate its oscillator is or is not, it has no external referance.
If you could do it with code alone, there would be no need for RTCs.