Formatting da6e as week # in access query

Posted on 2012-08-16
Last Modified: 2012-08-16
I would like to format a week in an access query to show the week #.  Does anyone know the proper format?
Question by:marku24
    LVL 65

    Expert Comment

    by:Jim Horn
    ?Format(now(), "ww")

    As apparently we're in the 33rd week of the year.

    BUT ... this is calendar week, so if you have a different definition of week number, you'll need to spell that out.

    Author Comment

    I got that to work in the query but it is formatting as a date:  

    33/_/_    How do i get it to format as a number.  the column format option has nothing in there so i can't select "number".
    LVL 65

    Accepted Solution

    >33/_/_    How do i get it to format as a number.
    Not really sure what your asking.

    There's a number of convert to number formats:

    CLng(anything) will return the Long Integer (i.e. no decimal values) numeric value.
    CDbl(anything) will return the Double (with decimal values) numeric value.
    LVL 65

    Expert Comment

    by:Jim Horn
    If you're trying to convert the 33 week...

    CInt(anything) converts to a small integer, which is +/- 32,000-ish.
    CByte(anything) converts to a byte, which is 0 to 255.
    LVL 65

    Expert Comment

    by:Jim Horn
    Thanks for the greade.  Good luck with your project.  -Jim

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
    PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    759 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

    14 Experts available now in Live!

    Get 1:1 Help Now