Solved

Coding first and last day of current month in Access

Posted on 2014-10-18
3
7,621 Views
Last Modified: 2014-10-18
Experts,

Is there a way to code first day of current month and first day of next month in an SQL query in Access.  I want to do this so the query does not have to change and can be run automatically each month.
0
Comment
Question by:morinia
3 Comments
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 200 total points
ID: 40389365
DateSerial(Year(Date()),Month(Date()),1)

DateSerial(Year(Date()),Month(Date())+1,1)

Jim.
0
 
LVL 29

Accepted Solution

by:
IrogSinta earned 300 total points
ID: 40389368
Use the DateSerial Function.  Here are some examples:
FirstDayOfMonth: DateSerial(Year(Date()), Month(Date()), 1)
LastDayOfMonth: DateSerial(Year(Date()), Month(Date())+1, 0)
FirstDayOfNextMonth: DateSerial(Year(Date()), Month(Date())+1, 1)

Ron
0
 
LVL 30

Expert Comment

by:hnasr
ID: 40389470
Check this link for displaying specific dates.
http://support.microsoft.com/kb/210604
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access Application Initial Installation 10 49
IIF syntax in MS Access 1 58
Null or "" 28 51
MS Access Pasthru Query to Execute SQL Stored procedure 8 24
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…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

679 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