Solved

Get 1st day of month

Posted on 2013-12-02
3
468 Views
Last Modified: 2013-12-02
Dear Experts

In an Access Query I need to be able to return the 1st day of the month from a field

the field is [Invoice Date]

so if [Invoice Date] = 15/10/2013 then the result should come out as 01/10/2013 etc.  This needs to come out as a date rather than a formatted text field

Can anybody help?

Many thanks
0
Comment
Question by:correlate
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39689970
this will give you the first date of the current month or any given date

dateserial(year(Date()),Month(Date()),1)

use like this
dateserial(year([Invoice Date]),Month([Invoice Date]),1)
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39689974
Try this:

FirstDay: DateSerial(Year([Invoice Date]), Month([Invoice Date]), 1)


EDIT:

Too slow.
0
 

Author Closing Comment

by:correlate
ID: 39689979
Perfect - thank you very much
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server views 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 Access…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

776 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