You are viewing limited content. For full access, please sign in.

Question

Question

Using date field to pull current month data

asked on August 2, 2024

Hello,

We use a date field to store an estimated delivery date. We use these dates to estimate revenue for that month. What I would like to do is have a field populated with the estimated revenue for the current month.

My thought is to search for all that have a delivery date for the current month, pull the money value for those projects. I just dont know how to get the ones that are shipping for the current month.. I can using a date range, but I dont want to have to change that workflow each month.

Thanks.

0 0

Answer

SELECTED ANSWER
replied on August 2, 2024 Show version history

To get the date range we just need to know the first day of the month and the last day of the month. Then we can search from first day to last day.

The first day is easy because it is always 1, so just hard code it to 1

The last day can also be easy to get because you can just subtract 1 day from the first of next month using the Data Calculator Token (this even covers the leap years)

To get the Month, Day and Year from the current date in Workflow, check out these formatting options

https://doc.laserfiche.com/laserfiche.documentation/en-us/Default.htm#../Subsystems/ProcessAutomation/Content/Resources/Workflow/Tokens-Regex/Date-and-Time-Formatting.htm

You can use d for day, M for month, and yyyy for year

To get your starting date swap out the day with a hard coded 1

To get your ending date, increment the month by 1 unless it is 12 in which case set it to 1 and increment the year instead.

Swap out the day to 1 again but subtract 1 day using the date token calculator.

Now you can search for everything with a date in that month range.

2 0
replied on August 2, 2024

Thanks for the guidance. Sometimes someone explains something to you and you just go "duh", so simple...

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.