There isn't one, and for a very good reason - you have to nail the business rules, and these won't be the same everywhere. For example, on what dat does your week start? It's Sunday for you (I assume, since you're in Australia), but it's Monday in the USA. Some businesses run Thursday through Wednesday as their week. The other business rule is the definition of week number 1 in the year. Assuming that you want to implement the ISO 8601 standard format yyyyWnn, in which every week has seven days, you must decide some kind of rule for week number 1 - for example the first week that has four dates in the calendar year. Using such a rule January 1st is often in week #53 of the preceding year.
Of course, if you don't require seven days in every week, and week number 1 starts on January 1st, then you can go with something like Int(Oconv(TheDate, "DJ") / 7) ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/