![](https://www.kmjnow.com/wp-content/uploads/sites/461/2021/08/David-Hernandez.jpg)
FRESNO, Calif. (KMJ/KFSN) — A man convicted of murder, armed robbery and carjacking has learned how long he will stay behind bars.
45-year-old David Hernandez was sentenced Tuesday morning to 40 years to life in prison for second-degree murder with a gun.
He was also sentenced to an additional 27 years and six months for robbery, carjacking and attempted carjacking.
Hernandez shot and killed Sarah Hamm in her northeast Fresno apartment in August of 2021.
Investigators say the two knew each other.
He also robbed a store clerk at gunpoint and stole a car on the same day.
Listen to the report by KMJ’s Liz Kern.