What is the formula for calculating the azimuth and altitude of a planet?
There is no formula for calculating altitude and azimuth given the date and longitude and latitude. First, you need an ephemeris to tell you the right ascension and declination of the planet at that time (converted either into UTC or Julian Date). Knowing that, you can convert pretty easily using the equations found in the link below.