none
First day of month RRS feed

  • Question

  • How do I get the first day of the month from any given date. I am trying to get this in an Access query, I am in design mode. Access2007

    Example:

    I have a field named [Completed/Returned] formatted as 6/7/2015 15:35.  I want a new field that returns the first day of the month in this format 2015-06-01 , I am naming this new field [Month-Year]

    Friday, July 31, 2015 4:46 PM

Answers

  • You can use

    Month-Year: DateSerial(Year([Completed/Returned]), Month([Completed/Returned]), 1)

    Set the Format property of this calculated column to the custom format yyyy-mm-dd.


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by PatYak Friday, July 31, 2015 4:52 PM
    Friday, July 31, 2015 4:48 PM