Question: I want to calculate Daylight hours based on given Latitude and Longitude and DateTime  

I mean calculate the time of sunrise and the time of sunset in a specefic Date and based on gegraphic coordinate.

Answer: 
Check this [***Latitude and Longitude and Daylight Hours***](https://web.archive.org/web/20180128172128/http://mathforum.org/library/drmath/view/56478.html)

```
   D = daylength
   L = latitude
   J = day of the year

   P = asin[.39795*cos(.2163108 + 2*atan{.9671396*tan[.00860(J-186)]})]

                          _                                         _
                         / sin(0.8333*pi/180) + sin(L*pi/180)*sin(P) \
   D = 24 - (24/pi)*acos{  -----------------------------------------  }
                         \_          cos(L*pi/180)*cos(P)           _/

```
sin24+(24cos-18^12)^(day number of the year)+(latitude)^24= #of daylight hours