Newbies dtantum Posted May 31, 2001 Newbies Posted May 31, 2001 Don't ask me why, but I have the need to be able to set a date field to the day before whatever the field currently says the date is. Scenario: I have a field... "Date_Out" that is a calculated result when a "Job" is closed. I need to be able to set that date to the day before "Today". It sounded easy until I started working on it! "Date_Out = Day(Date_Out) -1". Heh. That works great until it's the first of the month! At that point the Day is either the 28th, 30th, or 31st depending on the month, and if it's New Years Day, well... you get the idea. Has anyone else tried doing this? Any ideas? I can't seem to wrap my melted brain around the "logic" of calculating it. Dustin
BobWeaver Posted June 1, 2001 Posted June 1, 2001 Filemaker automatically handles the previous month or year situation when you subtract numbers from dates. So, this shouldn't be a problem. Of course you must have the field set up as a date field. BTW don't use the Day() function, just subtract 1 from the actual date: DATE_OUT - 1 [ May 31, 2001: Message edited by: BobWeaver ]
Newbies dtantum Posted June 1, 2001 Author Newbies Posted June 1, 2001 You da' man, Bob. It seems like I keep trying to over think things! Many, many thanks to you!!! Dustin
Recommended Posts
This topic is 8634 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 accountSign in
Already have an account? Sign in here.
Sign In Now