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.
Discussion posts and replies are publicly visible
In which context? Database, Record, Query, Expression, ...?
What did you try so far?
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.
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.
Can you please give me an example
docs.appian.com/.../Query_Recipes.html
Here's an example on how to calculate the start and end dates and how to create the queryFilter:
a!localVariables( local!now: now(), local!endDate: eomonth(local!now, - 1), local!startDateTime: userdatetime( year(local!endDate), month(local!endDate), 1, 0, 0, 0 ), local!endDateTime: userdatetime( year(local!endDate), month(local!endDate), day(local!endDate), 23, 59, 59 ), a!queryFilter( field: "timestamp", operator: "BETWEEN", value: { local!startDateTime, local!endDateTime } ) )
Thank you.