Solved

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

Posted on 2013-02-05
2
412 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
Viewers will learn the different options available in the Backstage view in Excel 2013.

763 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