Alright, came up with this
The approach –
1. Make a date field, set to current date so you can see the parts change.
2. Set the year of the date field in The_Date_2.
3. Set the week of the date field in The_Date_3.
4. Set the weekday of the date field in The_Date_4.
5. Remove the hours, minutes and second in The_Date_5.
6. Print all of them to see each piece is functioning properly.
DEFINE FILE WEEKLY_SUMM_DETAIL
THE_DATE_PREP/HYYMDs = HGETC(8, 'HYYMDs');
THE_DATE_2/HYYMDs = HSETPT(THE_DATE_PREP, 'year', EDIT(EDIT(WEEK_ATTENDED, '9999')), 8, 'HYYMDs');
THE_DATE_3/HYYMDs = HSETPT(THE_DATE_2, 'week', EDIT(EDIT(WEEK_ATTENDED, '$$$$$$99')), 8, 'HYYMDs');
THE_DATE_4/HYYMDs = HSETPT(THE_DATE_3, 'weekday', EDIT(EDIT(WEEK_ATTENDED, '$$$$$$$$$99')), 8, 'HYYMDs');
THE_DATE_5/HYYMDs = HMIDNT(THE_DATE_4, 8, 'HYYMDs');
END
TABLE FILE WEEKLY_SUMM_DETAIL
PRINT *
THE_DATE
THE_DATE_2
THE_DATE_3
THE_DATE_4
THE_DATE_5
WHERE RECORDLIMIT EQ 1000
END
Not pretty, but it works. I'm guessing there's an easier way.