Date formatting question

Posted on 2014-03-28
Last Modified: 2014-03-28
I have a date formatting question.   I need show the last day of the previous month on a report I am working on in Access 2013.  The format should be 20140228.
Question by:Mwvarner
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
  • 2
  • 2
  • 2
  • +2
LVL 40

Expert Comment

ID: 39962264
use a function like FORMAT:

Format (#28/02/2014#, "yyyymmdd") would return '20140228'
LVL 120

Accepted Solution

Rey Obrero (Capricorn1) earned 500 total points
ID: 39962269
use for dynamic result

LVL 50

Expert Comment

by:Gustav Brock
ID: 39962385
It would be:


Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.


Author Closing Comment

ID: 39962400
That is what I needed but it needed a little tweaking.  She the corrected syntax below.

LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39962470

you just added a +0 that means NOTHING

Expert Comment

ID: 39962529
SELECT DATEADD("d", -DAY(date()), date() )

Author Comment

ID: 39962536
I was referring to the () after the word date and that does mean something.
LVL 50

Expert Comment

by:Gustav Brock
ID: 39962913
Of course it means something. That's why I posted it as the solution.


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
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…

737 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