Re: Find in a date range
- From: Howard Schlossberg <howard@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 26 Feb 2008 21:01:06 -0800
buck.matthew74@xxxxxxxxx wrote:
On Feb 25, 10:51 pm, Howard Schlossberg
<how...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
buck.matthe...@xxxxxxxxx wrote:
I want to create a script that will select all records in the pastTo find everything for the past seven days:
week, past month, this year.
Set Variable [ $Today; get(currentdate) ]
Enter Find Mode []
Set Field [ DateField; getastext($Today-7) & "..." & getastext($Today) ]
Perform Find []
For the last complete week (Monday thru Sunday), change the Set Field
calc to:
let([
x=dayofweek($Today);
start = $Today - (5 + x);
end = $Today - (x - 1) ];
getastext(start) & "..." & getastext(end)
)
Past month:
let([
start = date(month($Today)-1; day($Today); year($Today));
end = $Today ];
getastext(start) & "..." & getastext(end)
)
Last full calendar month:
let([
start = date(month($Today)-1; 1; year($Today));
end = date(month($Today); 1; year($Today))-1 ];
getastext(start) & "..." & getastext(end)
)
I'll let you figure out the year thing.
This does not work. Let me make sure I have described things
correctly.
When I create an Order I enter into Date_Ordered field the current
date. From this I want to determine the found groups - past week, this
calendar month, this calendar year. Can you explain a better the
solution?
What do you mean when you say it doesn't work? It doesn't return the results you expected? The script doesn't run at all? FileMaker doesn't even let you exit the calc definition? Which one doesn't work? Or do none of them work?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg
FM Professional Solutions, Inc. Los Angeles
FileMaker 8 Certified Developer
Member, FileMaker Business Alliance
.
- References:
- Find in a date range
- From: buck . matthew74
- Re: Find in a date range
- From: Howard Schlossberg
- Re: Find in a date range
- From: buck . matthew74
- Find in a date range
- Prev by Date: Re: Find in a date range
- Next by Date: Re: Find in a date range
- Previous by thread: Re: Find in a date range
- Next by thread: Re: Find in a date range
- Index(es):
Relevant Pages
|
|