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
Solved

Get 1st day of month

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

856 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