Solved

Convert today's date to the number of the year

Posted on 2008-06-18
6
532 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
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 142

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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

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

LL
0
 
LVL 142

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

707 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

15 Experts available now in Live!

Get 1:1 Help Now