Solved

Get 1st day of month

Posted on 2013-12-02
3
490 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
[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
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

635 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