Is there a function to calculate e.g 3rd monday of every month. I know of OCONV but that returns the day.
Anyone out there kindly help.
Regards,
MRM
--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
That being said, rather than do the calculation, it might be better (simpler) to use an external table.
0001 today = DATE()0002 mth = OCONV(today, 'DM')0003 yr = OCONV(today, 'DY')0004 first_of_month = ICONV(mth:'-1-':yr, 'D')0005 day_of_week = OCONV(first_of_month, 'DW')0006 first_monday = first_of_month + (8-day_of_week)0007 CRT OCONV(first_monday, 'D'):' is the 1st Monday of this month.'
--
It's an easy fix...
--
Of which I gave you a head start.
For you it is, since you insist on dragging this out.
Thanks a lot for the head -ups, really appreciate your input! Will the same formula apply for example if i was looking for Tuesday, Wednesday, Thursday or Friday?
Here you go:0001 CRT 'Enter a date (e.g. 1/9/2013)':
0006 first_of_month = ICONV(mth:'-1-':yr, 'D')
--Kevin Powick--