• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 434
  • Last Modified:

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

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
zepold
Asked:
zepold
1 Solution
 
mbizupCommented:
Try this:

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

Open in new window

0
 
zepoldAuthor Commented:
That did it! Thank you very much.

dl
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now