If I understand the question properly, I believe this will do it:
 
  PRINT INT(OCONV(DATE(),'DJ')/7) +
OCONV((OCONV(DATE(),'DJ')/7:'')['.',2,1],"S;'1';'0'")
 
...but be aware that even though we think of a year as having 52 weeks, and
a week is 7 days, 7 * 52 = 364. As far as I know, a year always has 365 days
unless it is a leap year with 366 days.

Therefore, the above algorithm will return 53 for the last day of the year,
or for the last 2 days if it is a leap year.

Also, above algorithm might be totally useless if you are talking about your
company's FISCAL year, whatever it is defined to be.

Barry Brevik
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to