Software Venture Consulting

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

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


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:  

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

Allan Hunter, FileMaker Solutions Developer
http://home.earthlink.net/~allan.hunter/FmPro/fmdevindex.html

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.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

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.



SAMPLE INPUT AND RESULTS
------------------------------
"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

ahunter3@earthlink.net

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

This is my Custom Function and I want to edit it

Discuss:

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:
City/Location:
Comment:
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 8 + 8 =
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. ProperAllWords ( text )
  (Thu, Dec 14, 5:19pm)
2. MatchExist ( SourceTable.Field ; DestTable.Field ; ReturnField )
  (Thu, Dec 14, 1:07pm)
3. BVR_Format ( bvr )
  (Wed, Dec 13, 5:32pm)
4. NumberToHexadecimal(NumberValue)
  (Fri, Dec 08, 8:54am)
5. Get_BaseTable
  (Thu, Dec 07, 4:27pm)
6. JSONCreateVarsFromKeys ( json ; namespace )
  (Wed, Dec 06, 8:21pm)
7. GetTableNzme ( field )
  (Tue, Dec 05, 9:16pm)
8. TimeFormatAsText ( theTime )
  (Mon, Nov 13, 1:59pm)

RSS Feed of Custom Functions