Solved

Get 1st day of month

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

Accepted Solution

by:
Rey Obrero 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now