Solved

How to pull a two digit Fiscal Week from the system date.

Posted on 2013-02-05
2
417 Views
Last Modified: 2013-02-12
I have a database where I query records up to the prior fiscal week. The data contains a two-digit fiscal week, (ex: 01 - 52).  When I get the fiscal week from the system date, it comes back as a 1 digit week.  At least, until I get to fiscal week 10.  The formula that I am using is:

DatePart("ww",Date())

I need to find a way to embed a zero for weeks 1 - 9 and not for the weeks 10 - 52.  In the formula above, even though I use "ww", I will only get one digit for the fiscal week.

Is there a way to do this?
0
Comment
Question by:zepold
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 38857315
Try this:

Format(DatePart("ww",Date()),"00")

Open in new window

0
 

Author Closing Comment

by:zepold
ID: 38880347
That did it! Thank you very much.

dl
0

Featured Post

How To Reduce Deployment Times With Pre-Baked AMIs

Even if we can't include all the files in the base image, we can sometimes include some of the larger files that we would otherwise have to download, and we can also sometimes remove the most time-consuming steps. This can help a lot with reducing deployment times.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Suggested Courses

623 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