Need to calculate the number of days left until Friday of the current week, with only the current date as a reference. Possible? Forgive me I'm a beginner. I'm running on 14 if it matters
Welcome to the FileMaker Community. You asked your question in a corner of the Community I just found (and I'm the Community Manager). I've moved your question to our brand new New to FileMaker discussion area so that more people will see it and you'll get a friendly, helpful answer.
Welcome, Scott! New to FileMaker, are you also new to other things?
FileMaker has quite a few "date" functions, including:
FileMaker Pro 16 Help
Yes, this is FMP 16 help, but the function has been around since FMP 6.0, so you are good to go!
Another function that helps:
Get ( CurrentDate )
Put those together in an unstored calculation (number result) to know what day is today (in the week):
DayOfWeek ( Get ( CurrentDate ) )
We know that Friday is "6", so some math can apply to get the "number of days until Friday" (this week). You must come up with some decisions on how to handle something like today IS Friday or Saturday. But the raw number would be something like:
6 - DayOfWeek ( Get ( CurrentDate ) ) // 0 = today is Friday, -1 = today is Saturday
Can you tell us a bit more of how you'll use this result so that we can expand on what to do next?
Hello scottbarnum17 . Checking into see if beverly gave you the info you needed. Are you good, or do you need some more help with this?
Retrieving data ...