Jump to content

Date = The Day Before?


This topic is 8386 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

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

Link to comment
Share on other sites

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 ]

Link to comment
Share on other sites

This topic is 8386 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.