when was patient 65582 tested for magnesium for the last time this month?
select labevents.charttime from labevents where labevents.itemid in ( select d_labitems.itemid from d_labitems where d_labitems.label = 'magnesium' ) and labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 65582 ) and datetime(labevents.charttime,'start of month') = datetime(current_time,'start of month','-0 month') order by labevents.charttime desc limit 1