The man who admitted stabbing a woman at the Walmart in Geneseo in June of last year will serve 20 years in prison.
Gregory Cunningham pleaded guilty in March to assault.
He stabbed a woman several times in the incident.
The victim was hospitalized but survived.
Court papers say Cunningham was diagnosed with schizophrenia.