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
Solved

Convert today's date to the number of the year

Posted on 2008-06-18
6
557 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 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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…

809 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