Solved

Convert today's date to the number of the year

Posted on 2008-06-18
6
565 Views
Last Modified: 2013-11-28
Hi experts:

I'd like to have this calculation: (date()-91)/365 in the report, like today is the 169th day of the year, the value should be 0.2137.. My expression didn't work, could experts help me?

Thank you!

LL
0
Comment
Question by:howruaz9
[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
6 Comments
 
LVL 65

Accepted Solution

by:
Jim Horn earned 500 total points
ID: 21816293
Give this a whirl...

CSng(DateDiff("d", #1/1/2008#, date) / 365)
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21816411
DatePart will be more generic:

CSng(DatePart("dy", date) / 365) 

Open in new window

0
 

Author Closing Comment

by:howruaz9
ID: 31468544
Thank you very much, it's working.

LL
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

Author Comment

by:howruaz9
ID: 21816528
Thank you, angelllll, I wish I could have more points to give.

LL
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21816611
no problem.
0
 
LVL 12

Expert Comment

by:nexusnation
ID: 21817009
Don't worry, a3 has more than enough. :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

740 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