locked
1st day of month expression RRS feed

  • Question

  • Is there an expression that returns the 1st day of the month: month of Jan 2017, first day is 1/1/2017

    Also, for the last day of the month?

    thanks

    Monday, December 7, 2020 7:37 PM

All replies

  • Let's say MyDate is a date field. In a query, you can use the following expressions:

    FirstDay: DateSerial(Year([MyDate]),Month([MyDate]),1)

    LastDay: DateSerial(Year([MyDate]),Month([MyDate])+1,0)


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

    Monday, December 7, 2020 7:42 PM