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

Timestamp_Format_RFC822 ( _timestamp ; _timezone )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.5  (36 votes)
  Discuss this Custom Function

Rewolfer, -
http://rewolfer.de

Formats a valid RFC2822-timestamps as FMP-timestamps or vice versa.

Sample Input:
Timestamp_Format_RFC822 ("09/12/2002 18:12:17"; -3.5 )
Timestamp_Format_RFC822 ("Thu, 12 Sep 2002 18:12:17 +0200"; "" )
Timestamp_Format_RFC822 ("Thu, 12 Sep 2002 18:12:17 +0200"; 1 )
Timestamp_Format_RFC822 ("Tue, 30 Feb 2002 18:12:17 +0630"; 1 )
Sample Output:
"Thu, 12 Sep 2002 18:12:17 -0330" (Newfoundland Standard Time)

"09/12/2002 18:12:17"

"09/12/2002 16:12:17" (Universal Time/ GMT)

"" (invalid date)


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

Description:

/*=========================================

FORM: Timestamp_Format_RFC822 ( _timestamp ; _timezone )

PURPOSE: formats valid RFC2822-timestamps as FMP-timestamps or vice versa

PARAMETER: _timestamp RFC822 or FMP-timestamp regional
_timezone number -11.5 to 11.5

RESULT: FMP-timestamp or RFC822-timestamp or nothing

DEPENDENCY: IsTimestamp()

NOTE: valid FMP-timestamp will be formatted as RFC822-timestamp with timezone (if supplied as decimal hour)
valid RFC822-timestamp will be formatted as FMP-timestamp (as UniversalTime if _timezone is not 0 or not empty)
no in-/ output of textual timezones like "EST"
tolerates whitespace
tolerates 2-digit-years in RFC822-timestamps
requires 4-digit-years in FMP-timestamps
see IsTimestamp(), IsDate(), IsTime() for further details

EXAMPLE: Stamp_Format_RFC822 ("09/12/2002 18:12:17"; -3.5 ) => "Thu, 12 Sep 2002 18:12:17 -0330" (Newfoundland Standard Time)
Stamp_Format_RFC822 ("Thu, 12 Sep 2002 18:12:17 +0200"; "" ) => "09/12/2002 18:12:17"
Stamp_Format_RFC822 ("Thu, 12 Sep 2002 18:12:17 +0200"; 1 ) => "09/12/2002 16:12:17" (Universal Time/ GMT)
Stamp_Format_RFC822 ("Tue, 30 Feb 2002 18:12:17 +0630"; 1 ) => "" (invalid date)

HISTORY: 2006-03-01 [145342] 1.00 tsw initial version
2006-03-01 [210707] 2.00 tsw with local time and error checking
2007-02-19 [003455] 2.10 tsw needed update because of changes to Text_Get_DelimitedValue-function
2011-03-15 [192012] 2.20 tsw renamed according to new naming convention
2011-03-16 [115008] 3.00 tsw if other than ISO-dates were used, function didn't work
2011-09-15 [145831] 3.01 tsw new documentation
2012-04-23 [223756] 4.00 tsw merged functions; converts timestamp to RFC822 or vice versa
2012-04-25 [214219] 4.10 tsw shorten code thru IsTimestamp()

DEVELOPER: tsw @ http://rewolfer.de

=========================================*/

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:

There are no comments yet. Be the first to post 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 1 + 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. HexUUIDToNum_cf (_uuid)
  (Sat, Jun 16, 1:55pm)
2. httpResponseCode ( responseHeaders )
  (Tue, Jun 12, 10:40pm)
3. FindDuplicateCharacters ( string )
  (Fri, Jun 08, 5:01pm)
4. FieldRepetitionLast ( field ; maxRepetition )
  (Wed, Jun 06, 6:05pm)
5. CountModifiedRecords ( NameTimestampField ; StartTimestamp ; EndTimestamp )
  (Mon, May 28, 8:23am)
6. JSONArrayLength ( JSONArrayStr )
  (Fri, May 25, 7:46am)
7. interpolation (y1; y2; y3; x1; x2; x3; x1y1; x2y1; x1y2; x2y2; rnd)
  (Sat, May 19, 3:55am)
8. @JSONFormatElements ( json )
  (Tue, May 15, 3:31am)

RSS Feed of Custom Functions