Week number in Crystal reports

Posted on 2009-04-17
Last Modified: 2012-05-06
I need to calculate the week number that we are currently in for a crystal report from a given date.
Question by:ross13
    LVL 25

    Accepted Solution


    Expert Comment

    According to According to ISO 8601 the week starts on Monday, so the formula should be:


    In CR (and maybe later versions too) I discoverd a bug in this function for the dates 1-1-2010 until 3-1-2010. The function returns 9652 or 9653 instead of 53 !!

    To workaround this bug use the formula:

    IIF( DatePart("ww",{Table.DateField},crMonday,crFirstFourDays) > 53, 53,   DatePart("ww",{Table.DateField},crMonday,crFirstFourDays))

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
    Hi, In my previous Article  ( discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now