In case you are still working on this:
truncate((InvcHead.InvoiceDate + 4 - weekday(InvcHead.InvoiceDate) - date( 1, 1, year(InvcHead.InvoiceDate + 4 - weekday(InvcHead.InvoiceDate)))/ 7) , 0) + 1
This assumes that if January 1st falls after a Wednesday (weekday = 4), the first week of the year starts the following week.
Let me know if this works for you.
truncate((InvcHead.InvoiceDate + 4 - weekday(InvcHead.InvoiceDate) - date( 1, 1, year(InvcHead.InvoiceDate + 4 - weekday(InvcHead.InvoiceDate)))/ 7) , 0) + 1
This assumes that if January 1st falls after a Wednesday (weekday = 4), the first week of the year starts the following week.
Let me know if this works for you.
--- In vantage@yahoogroups.com, "Chris Henzel" <chris.henzel@...> wrote:
>
> Hi,
>
>
>
> Using a BAQ is it possible to calculate a week number from a date?
>
>
>
> Thanks
>
>
> Chris HenzelEpicor 9 Project ManagerTel: +44 (0)1582 436150Mob: 07836 314164
>
>
> This message contains confidential information and is intended only for the intended recipients. If you are not an intended recipient you should not disseminate, distribute or copy this email. Please notify the sender if you have received this email by mistake and delete it from your system.Email transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender does not accept liability for any errors or omissions in the contents of this message, which arise as a result of email transmission. Registered Office: Hayward Tyler Ltd, 1 Kimpton Road, Luton, LU1 3LD, England. Tel: +44 (0)1582 731144. Company No. 3450138.
>
>
>
> [Non-text portions of this message have been removed]
>