Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


Privacy Policy

FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.


 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

UltraDate (Text; LongDate_or_DateDigit)

Rate this function:  

  Average rating: 4.8  (25 votes)
  Discuss this Custom Function

Allan Hunter, FileMaker Solutions Developer

For accommodating dates outside the 4000-year date range of native FileMaker date fields

Sample Input:
UltraDate ("12/31/0001 BC"; "LongDate")
Sample Output:
Sunday, December 31, 1 BC

 Then copy & paste into FileMaker Advanced's Edit Custom Function window.


Allan Hunter, FileMaker Solutions Developer, 2012
UltraDate, a custom function for accommodating dates outside the 4000-year date range of native FileMaker date fields
Input: text containing date strings of the format month/day/year {BC or BCE for dates before 1/1/0001};
2nd parameter determines what is returned: LongDate is day of week, month day, year e.g., Sunday, December 31, 4000;
DateDigit is the serial number of that date, indexed to 1/1/0001 =1, same as what you get from GetAsNumber (Date)
in a true native FileMaker date field, hence useful for sorting and doing finds on date ranges and using for relationships.

"12/31/4000, LongDate" Sunday, December 31, 4000
"1/1/4001, LongDate" Monday, January 1, 4001
"1/1/0001, LongDate" Monday, January 1, 1
"12/31/01 BC, LongDate" Sunday, December 31, 1 BC

"12/31/4000, DateDigit" 1460670
"1/1/4001, DateDigit" 1460671
"1/1/1, DateDigit" 1
"12/31/0001 BCE, DateDigit" 0

"12/30/1 BC, LongDate" Saturday, December 30, 1 BC
"12/30/1 BC, DateDigit" -1
"5/1/9012, LongDate" Friday, May 1, 9012
"3/19/7200 BC, LongDate" Tuesday, March 19, 7200 BC
"3/15/44 BC, LongDate" Saturday, March 15, 44 BC
"10/23/4004 BC, DateDigit" -1462134
"6/13/876347 BCE, LongDate" Sunday, June 13, 876347 BC

Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it


I'm rather klunky with recursive functions. Feel welcome to improve or offer comments for improving if you see more elegant ways of going at it.

Short of a (Gregorian) calendar showing dates before 1/1/0001 or after 12/31/4000 to compare, I can only try a few that are close enough to dates natively handled by FileMaker to verify that the DayNames and DateDigits are as they should be, but within those limitations they seem to be. (I found a few references to ancient dates that mention the day of week which are different than what I get via this CF, but I have reason to believe those are old Julian calendar dates or even older calendar formats and hence not relevant).

Allan Hunter, NYC, NY
May 02, 2012 9:53am

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 6 + 6 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. SortList ( theList )
  (Sat, Jun 23, 8:45am)
2. HexUUIDToNum_cf (_uuid)
  (Sat, Jun 16, 1:55pm)
3. httpResponseCode ( responseHeaders )
  (Tue, Jun 12, 10:40pm)
4. FindDuplicateCharacters ( string )
  (Fri, Jun 08, 5:01pm)
5. FieldRepetitionLast ( field ; maxRepetition )
  (Wed, Jun 06, 6:05pm)
6. CountModifiedRecords ( NameTimestampField ; StartTimestamp ; EndTimestamp )
  (Mon, May 28, 8:23am)
7. JSONArrayLength ( JSONArrayStr )
  (Fri, May 25, 7:46am)
8. interpolation (y1; y2; y3; x1; x2; x3; x1y1; x2y1; x1y2; x2y2; rnd)
  (Sat, May 19, 3:55am)

RSS Feed of Custom Functions