The man was walking through Amblecote Recreation Ground in Stourbridge with his girlfriend when the two boys demanded money and other belongings from him.
The incident took place shortly before 9.30pm last Thursday, October 20, and involved a machete.
During the ordeal, a scuffle broke out, during which the victim was struck in the legs with a machete and suffered superficial wounds.
A spokesperson for West Midlands Ambulance Service said: "We were called at 9.32pm on Thursday to reports of a stabbing on Collis Street, Amblecote in Stourbridge.
"One ambulance and a paramedic officer attended. Upon arrival we found a man.
"He was assessed and had sustained minor injuries, he received treatment at the scene. He received self-care advice from ambulance staff before being discharged."
West Midlands Police has since released an appeal for any information after both of the boys fled the scene on foot.
A spokesperson said: "We’re appealing for information after a man received cuts to his leg following an attempted robbery at Amblecote Recreation Ground in Stourbridge, shortly before 9.30pm, on October 20.
"The victim, who was in the park with his girlfriend, was approached by two boys believed to be aged around 12 and 14, who demanded money and other belongings.
"A scuffle ensued and the victim was struck in the leg with a machete causing superficial wounds. The two boys fled the scene.
"Anyone with any information should contact us via Live Chat on our website or call 101 quoting 4029 of October 20.
"Alternatively ring Crimestoppers on 0800 555111."