Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7259 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

So I'm trying to write a script (which will be run at login, or manually run...I'm not sure yet) that exports all records who ordered on a given day of the month (If today is the 20th of the month it will export every record with an order date of jan 20, feb 20, march 20, etc...). However, I run into problems when combatting the issue of months without 31 days. If someone orders on March 31, they will not be exported in April because there are only 30 days.

Now, I came up with a potential solution where I just export all orders from 28-31 on the 28th and include a command at the beginning of the script that cancels it on 29, 30, and 31. But this got me thinking if there was a better way to do stuff on a monthly basis like this and fixing the 30/31 issue, instead of avoiding it like I did. Any help would be greatly appreciated as I am not a huge fan of the solution I came up with.

Posted

You could create a number calculation field of Day(DateOrder) and perform your find in that field. If there is no 29, 30, or 31, it won't matter. If you want to limit the search by year, add a calculation of Year(DateOrder) and include it in your criteria.

This topic is 7259 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.