Solved

Access get quarter from date

Posted on 2013-11-20
2
544 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
[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
2 Comments
 
LVL 38

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
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…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

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