FormatTimestamp ( format ; tstamp )
Formats a time/date any way you like using a format string
			
 
 
 
 
    Average rating: 4.4 (30 votes)  Log in to vote		
| Tim Mansour - Show more from this author | 
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
			Formats a timestamp according to a format string, replacing date/time component placeholders with respective data. See the Substitute command in the function to determine (or change) the placeholders to use. Includes placeholders to allow upper/lower case for text components (eg, day names).
Use a null input timestamp ("") to format the current date/time.		
Comments
| simon Plint, Australia Mar 24, 2010  | 
			||
| hr12 = Mod ( h - 1; 12 ) + 1 should be hr12 = Mod ( hr - 1; 12 ) + 1 ["[am]"; If ( h < 12; "am"; "pm" )]; should be ["[am]"; If ( hr < 12; "am"; "pm" )];  | 
			||
| Tim Mansour Mar 24, 2010  | 
			||
| I've updated the function to my latest version. | ||
| Kevin Smith, London Jun 3, 2015  | 
			||
| Watch out for when keying in the formatting parameters. The case of the parameter often controls the case of the output e.g. "[month]" vs "[MONTH]". Here's an exception: The parameter "[mm]" generates minutes while the parameter "[MM]" generates months.  | 
			||
| Tony White, Tony White Designs, Inc. Oct 1, 2022  | 
			||
| Thanks! Posted some thoughts here... https://the.fmsoup.org/t/whats-a-custom-function-youve-created-that-you-think-should-be-built-in-to-filemaker/3091/32  | 
			||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.