Last active
August 29, 2015 14:07
-
-
Save jaccorens/1518778c2faf1ab09c36 to your computer and use it in GitHub Desktop.
Filemaker search variables for previous week
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$currentDate = Get ( CurrentDate ) | |
$searchStart = GetAsDate ( 7 * Int ( ( $currentDate + 7 ) / 7 ) - 13 ) // previous monday from today | |
$searchEnd = GetAsDate ( 7 * Int ( ( $currentDate + 7 ) / 7 ) - 7 ) // previous sunday from today | |
$searchRange = $searchStart & "..." & $searchEnd | |
//FileMaker formula |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice. The only change I would make is the 3rd line. You've already calculated the start of the week there is no need to do double work.