Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

here's a wierd one with the TIME field!

Featured Replies

I've got a field called DATE and another TIME - simple

I've got a button that updates these two fields using script

set field(DATE, Today)

set field(TIME, Today)

the date works perfectly

the time displays 205:20:49

Why? Does anyone know? The time field is field type TIME

Thanks guys/gals

Use Insert Calculated Result (Status(CurentTime)) in the time field, not Today. Today is a function of date, ecept in AppleScript.

HTH

Olad Advance Man

Hi Matt,

The O.A.M. is corrrect of course. Here's more background: FileMaker stores dates as integers representing the number of days since 1/0/01. December 3, 2001, then is 730,822.

FileMaker stores time data as integers representing a number of seconds. You will probably find that 730,822 seconds equals 203:00:22 (203 hrs, 00 min, 22 sec).

So the behavior you saw was simply that you were accidentally treating days (of a date) as seconds (of time).

Good luck!

Don't use the Today function (read the FMP Help info to find out why). Use Status(CurrentDate) instead.

Today only does date. Was there a NOW function for time?

quote:

Originally posted by Vaughan:

Don't use the Today function (read the FMP Help info to find out why). Use Status(CurrentDate) instead.

Today only does date. Was there a NOW function for time?

Read what Andy Lecates said. For time use StatusCurrentTime.

  • Author

Thanks guys - I forgot that with PC's it seems to work but Mac's are a different breed. On a database at my work I wrote a filemaker database which includes a diary service and I had used the Today function with no problem at all. On a Mac, for which I'm writing this new database, It probably deals with date and time differently with a different set of control codes away from DOS Time & Date.

Is it then adviseable to consider more cross platform approaches to things rather than hoping that any differences would be ironed out by filemaker? I mean, is there only 90% cross platform and 100% if you choose a better command?

Please also refer to my question in Portals Forum, This one still has me stumped. Cheers guys.

[ December 04, 2001: Message edited by: Matt Lightbourn ]

Hi Matt,

quote:

Originally posted by Matt Lightbourn:

Thanks guys - I forgot that with PC's it seems to work but Mac's are a different breed. On a database at my work I wrote a filemaker database which includes a diary service and I had used the Today function with no problem at all. On a Mac, for which I'm writing this new database, It probably deals with date and time differently with a different set of control codes away from DOS Time & Date.

Is it then adviseable to consider more cross platform approaches to things rather than hoping that any differences would be ironed out by filemaker? I mean, is there only 90% cross platform and 100% if you choose a better command?

Please also refer to my question in Portals Forum, This one still has me stumped. Cheers guys.

[ December 04, 2001: Message edited by: Matt Lightbourn ]

I can almost guarantee that you did not use Today in FileMaker for Windows to return [correct] time data. FileMaker is consistent across platforms and has always serialized time and date data the same way, AFAIK.

Dates - a serial number representing duration in days (with 0 = January 0, 0001)

Time - a serial number representing duration in seconds (with 0 = 12:00am for time of day).

The Today function has been in FileMaker since before Status() functions were added. It is generally unpopular now, because it only updates at time of file launch (by FMP not FMS).

Since Status(CurrentDate) arrived, it is generally preferred by developers. It can be used in any calculation and will re-calculate whenever the calculation is performed. Note that stored/indexed calculations will not recalculate merely on a date change, so usually Status(CurrentDate) is used in unstored calculations that will recalculate whenever they are accessed.

Good luck,

  • Author

I have been using Today on PC Version but only with 50% success rate. My comments earlier were based upon thinking that perhaps macs and pc generate information slightly differently and that Current Status was just a Universal command to get the same result from both - if I am not accurate in this, then my seperation of the data processing formats and pc's are wrong and I apologise

Use "Status(CurrentTime)" - it will work on both platforms.

Eeeek, sorry I never meant to suggest using any function other than Status(CurrentTime) to get time information.

I was merely asking whether FMP had a NOW function. (I'm pretty sure it'd suffer the same problems that TODAY does.)

  • Author

Okay, we got that one sorted but, if Filemaker is running on the server, and because it is a perminently opened file, it doesn't seem to update to current date anyway! It seems to only know when it was originally opened. How do we deal with that one?

Cheers guys

quote:

Originally posted by Matt Lightbourn:

Okay, we got that one sorted but, if Filemaker is running on the server, and because it is a perminently opened file, it doesn't seem to update to current date anyway! It seems to only know when it was originally opened. How do we deal with that one?

Cheers guys

I believe this may be covered in several places including the docs and in a TIL, but here is the gist of it.

At sometime after midnight, have the file on the server close, and then reopen. Thereafter the first guest to connect to it will cause the date to recalculate. If you have several hundred records this is not so bad. if you have half a million records, this is not a good idea.

You can have FIleMAker Pro--not FileMAker Server--recalculate the dates overnight on the server. Or. just avoid the TOday function altogether if you can.

HTH

Old Advance Man

The calculation fields that use the Status(CurrentDate) and Status(CurrentTime) functions should be UNSTORED. That way they always re-calculate.

Avoid TODAY function like the plague. If you have used TODAY just replace it with the Status(CurrentDate) function, they are functionally equivilent in this regard.

  • Author

Thanks for the advice. I take it the best route to take is to do an unstored calculation of Status (Current Date) which should re-calculate constantly when refered to.

This, if it's full proof, is perfect - thank you again

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.