Brian Dunning's FileMaker Custom Functions

Timestamp_Format_RFC822 ( _timestamp ; _timezone )

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

  Average rating: 4.6 (34 votes) Log in to vote

Rewolfer   Rewolfer - Show more from this author
http://rewolfer.de

Share on Facebook Share on Twitter

  Sample input:
Timestamp_Format_RFC822 ("09/12/2002 18:12:17"; -3.5 )
  Sample output:
"Thu, 12 Sep 2002 18:12:17 -0330"

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This function was merged with its counterpart into:
Timestamp_Format_RFC822 ()

You can find it here:
http://www.briandunning.com/cf/1235

 

Comments

Steve Savery   Steve Savery, United Kingdom
Mar 15, 2011
Inputting "Thu, 20 Jan 2011 14:37:15 +0000" with timezoned either true or false returns '?'. I'm using FileMaker 11, would this explain the problem or do you know what else might be the cause?
 
TS Wolf   TS Wolf, Berlin
Mar 15, 2011
hello steve,
if i use your value my filemaker 11.02 shows as it should "2011-01-20 14:37:15". the timezoned-parameter only kicks in if set to 1; all other values will be ignored.
did you check:
• installation of the other custom function (get_explodedkey)
• using the right format in your calculation (timestamp)?
i hope i could be of any help,
ts wolf.
 
Steve Savery   Steve Savery, United Kingdom
Mar 15, 2011
Thanks for the reply. I'm use FMA 11 v2 with both custom functions installed correctly (to the best of my knowledge, I've also just placed them into a new db to check) and am calling it thus convert_date_rfc822timestamp ( "Thu, 20 Jan 2011 14:37:15 +0000" ; "0" ) but am still returned "?".

You ask if I'm using the correct timestamp format; I'm using the Data Viewer to test this custom function as shown above.
 
TS Wolf   TS Wolf, Berlin
Mar 15, 2011
hello steve,
i re-checkt the code here at brian dunning and it seems that some chars were not saved correctly (is same or greater). so i used ">=" now.
can you try this updated version, please, since the custom function works as expected in my installation (http://i53.tinypic.com/e968at.png).
 
Steve Savery   Steve Savery, United Kingdom
Mar 15, 2011
Sorry to report that I am still getting the same result. I've compared the function above with what I had previously and can see the ">=" differences, so I'm sure I have the correct new code to test with.

(see http://tinypic.com?ref=21az9kg)
 
TS Wolf   TS Wolf, Berlin
Mar 15, 2011
i reposted the entire code. since i had renamed the function you have to rename GET_EXPLODEDKEY to STRING_GET_EXPLODE.
if nothing helps you can download a demo-file under http://tinyurl.com/67m48wt
tell me if you found something, please.
 
Steve Savery   Steve Savery, United Kingdom
Mar 16, 2011
I fear I may have been wasting your time. Your example file works first time, yet if I delete the earlier custom functions from my db and import yours from the supplied file it fails in my db. Yet it still works in your example db.

Could it be a limitation of hosted files? Or a conflict with other custom functions?
 
TS Wolf   TS Wolf, Berlin
Mar 16, 2011
i think i found it: i created a file with british time settings and got the same result as you.
i fixed the handling of international dates and hope the function now works in your db as well.
copy new code and post if it works.
thanks for your extensiv feedback.
 
Steve Savery   Steve Savery, United Kingdom
Mar 16, 2011
Hi, yes found the same thing. So I've changed around date_year with date_day when formatting the date from the string.

Many, many thanks for all your help. This is about to put to very good use!
 

Log in to post comments.

 

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

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: