Solved

Convert today's date to the number of the year

Posted on 2008-06-18
6
568 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 66

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

696 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