Solved

Access get quarter from date

Posted on 2013-11-20
2
506 Views
Last Modified: 2013-11-20
Dear Experts,

I want to be able to produce a calculated field in a table which will show the quarter in which an invoice is raised.  The date the invoice is raised comes from [Invoice Date].

I can see how to split it into months, years etc. but not by quarter

Can anybody help?
0
Comment
Question by:correlate
2 Comments
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
ID: 39663173
There is no need to store the value.  Add a calculated field to your query using the Format() function.

Select ..., Format(YourDate, "yyyy-q") as InvQtr
From YourTable;

Look up the Format function to see all the options.  The expression above will return 2013-4 for today's date.
0
 

Author Closing Comment

by:correlate
ID: 39663210
perfect -thank you very much, works a treat
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
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 …

743 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

12 Experts available now in Live!

Get 1:1 Help Now