I was watching Tim Burton's Batman series and found out that Harvey Dent was played by a black man but he is played by a white guy in Nolan's series. What race is Harvey Dent portrayed as in the comics, and why the discrepancies?
They're both technically true, as each adaptation has its own official canon.
The canon with Billy Dee Williams as Harvey Dent continues on from the first two Tim Burton films, with Tommy Lee Jones taking over the role as Two-Face in Batman Forever. Billy Dee Williams was initially intended to portray Harvey Dent post-mutilation, but the role was given to Tommy Lee Jones. However, it is considered the same character.
As for the portrayal of Harvey Dent in The Dark Knight, the character is in a different continuity than the Tim Burton/Joel Schumacher canon.
Harvey was white in the comics: