March 10, 200718 yr OK, I'm doing a simple check compared the the current date so my data set can expand as time passes. I'm doing them in quarterly increments. When I'm doing my arguments, it works fine for April and July, but when I get to October it reports as true. Get ( CurrentDate ) > "4/1/2007" result 0 Get ( CurrentDate ) > "7/1/2007" result 0 Get ( CurrentDate ) > "10/1/2007" result 1 ?? Can someone else try these and see what you get? I've tried it on two clients and both do the same thing.
March 10, 200718 yr I can't understand what you want here ... "so my data set can expand as time passes" but you are hard-coding the year within the calc??? Are you just trying to determine what quarter you are currently in? Let ( d = Get ( CurrentDate ) ; Case ( Month ( d ) < 4 ; 1 ; Month ( d ) < 7 ; 2 ; Month ( d ) < 11 ; 3 ; 4 ) ) If this isn't what you need, please explain it in different words. :wink2:
March 10, 200718 yr The reason your calc is working funny are the quotes, that makes things into strings, not dates, something like: Get(CurrentDate) > GetAsDate("4/1/2007") would make more sense.
March 10, 200718 yr Author Ah, that fixed it. GetAsDate made it work correctly. I'm still confused why FileMaker reports this as being true when clearly today isn't greater than October 1st. Get ( CurrentDate ) > "10/1/2007" Been using FM since version 2 and it is always simple things like this that perplex me. Thanks for the help.
March 10, 200718 yr It's doing a string compare on "3/9/2007" verus "10...", and "3" is > "1", so this returns true. Adding the GetAsDate() makes them compare as actual dates, which is what you meant.
Create an account or sign in to comment