Skip to main content
September 7, 2023
Question

To find if a given date is from previous month

  • September 7, 2023
  • 10 replies
  • 0 views

Hi

I need to find out if a particular date which is stored in record type is from the previous month.  For example today in September I'm finding that 7th of August 2023 date (Already present in record type) is from August month.  How can I achieve this?  Please give me the suggestions.

Thanks.

    10 replies

    stefanhelzle0001
    Brainy
    September 7, 2023

    In which context? Database, Record, Query, Expression, ...?

    What did you try so far?

    September 7, 2023

    Actually there is a schedular which executes monthly and I need to get the data in Excel, so using Export CDT To Excel Smart Service and in the filter option present in smart service I want to filter the date present in CDT. Basically I want all the data booked in the previous month.

    stefanhelzle0001
    Brainy
    September 7, 2023

    The easiest approach is to filter for values that are between the first day and the last day of the month before. User a "between" operator in the query for filtering, and the eomonth() function to find the last month.

    gayathris111098
    September 7, 2023

    month(ri!date)=month(today())-1

    September 8, 2023

    Thank you