Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Difference between Now function and Date function


rsb87

Recommended Posts

I'm curious if anybody knows what the difference is between the now function and the date function. Is there benefits to using one over the other?

 

Thanks.

Link to comment
Share on other sites

There is no Now() function in Filemaker Pro 7.

 

---

There is no Now() function in Filemaker Pro 4, either. Was there ever such function in 5 or 6?

Link to comment
Share on other sites

No, there never was a Now() function. Could rsb87 mean the Today function? But then is rsb87's "Date" function the Date() function or the Get(CurrentDate) function?

Link to comment
Share on other sites

Snap along:

 

Oh no, there never was a Now,

Doo doo, da doo-woa.

Yesterday, there was a Today,

Da doo, da doo-woa,

So there must'a been a Now,

Da doo, da doo-woa,

Only then, it was "Today",

Da doo, da Oh yea.

Link to comment
Share on other sites

Golly Comment - "Now" is actually "Then" the second after it was now. How could that be useful?

 

Tom smile.gif

Link to comment
Share on other sites

My appology, I switch environments all the time and so I got the names mixed up. Ender is correct, I'm wondering what the difference is between the Today() Function and the Date() function. Since he mentioned it, what is the difference between the Get(CurrentDate) function. I have just switched over to FMP7 from 6 so perhaps some of these are no longer valid. Any info would be greatly appreciated.

 

Thanks,

rsb87

Link to comment
Share on other sites

Today is no longer available in v7. In v6, it can be used to generate the current date, just as Get(Currentdate) in v7 and Status(Currentdate) in v6. The Today function is considered obsolete by some, even in v6.

Date(mm;dd;yyyy) can be used to generate any date from three number or calc fields (or hardcoded values).

 

If you use Get(currentdate) in a calculation pay attention to storing settings, unstored will have the field updated, stored not.

 

kjoe

Link to comment
Share on other sites

As kjoe has said, Today is obsolete. But even when it wasn't, its role was quite different from that of the Date( ) function (which is used to specify an explicitly given date in FileMaker's internal date format, for use in calculations etc).

 

The reasons that the Today function had fallen out of favour over a number of years are:

1. It resulted (and depended on) a forced reevaluation of stored calculations in which it was used, at file open - and this could introduce a lengthy delay when the files were large (sometimes running to an hour or more). Most users found this unacceptable.

2. In a 24/7 multi-user solution, the Today function was not updated on the server or the client which the system clock/calendar ticked over, with the effect that it fell further behind the longer the solution was online. Not good.

 

The alternative approach that many preferred in earlier versions of FileMaker, was to either:

a) use an unstored calcualtion based on the Status(CurrentDate) function, or

b) create a date field called CurrentDate (or similar) and set up the start-up script to check that the date in that field was current and update it if not (eg using a loop or a Replace procedure, depending on the requirements of the solution).

 

In FileMaker 7, since as kjoe has said, the Today function has been dropped, the latter technqiues (and variants of them) are the order of the day. Note that the Get(CurrentDate) function is the v7 equivalent of v6's Status(CurrentDate) function. wink.gif

Link to comment
Share on other sites

  • 2 years later...

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use