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.

Insert Random Date

Featured Replies

hi there everyone... i have a little project that i am trying to finish. i have a field that is a date. i'm trying to create a script that will create a random date with a range of the year 2000 and 2001. the dates can be duplicated just within these years. any help would be great...

thanx

In FM dates are stored as number of days starting at January 1, 1900. to generate a random date you can use the Random function to pick a random number between zero and one and scale by the date range you wish. Your function might look like:

RandomDate (calculation, date) =

Date(1,1,2000) + Int(730 * Random)

This should be a stored calculation so that once selected it doesn't recalculate.

-bd

quote:

Originally posted by LiveOak:

In FM dates are stored as number of days starting at January 1, 1900.

-bd

Whoops. I think you'll find that it is actually January 1,0001, not January 1, 1900. Of course there was no such date as Janaury 1,0001, but FileMaker Pro treats it as 1.

HTH

Old Advance Man

Oops! January 1, 0001 is correct.

-bd

  • Author

Thank you very much.... i knew about the "random function". the number of days was what got me. Thank you once again.

Peter

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.