November 4, 201312 yr Does FileMaker have a function that can format a date the way you would like? The one in the Inspector is like what I am talking about. Or do you have to write one yourself? I have a date in one of my calculations that leaves off leading zeros on days and months I want: 9/2/2013 to be 09/02/2013 Are there any documents by FileMaker that show functions and formatting like dd = 09 YYYY = 2013?
November 4, 201312 yr Unless you set the format of the date on a specific field, using the inspector then the only way is to use a custom function. As soon as you do things like display a date in a merge field, or withing a calculated text string then you lose control of the date format. There's lots around... do a Google search... Brian Dunning's site will have at least a handful of good custom functions to do what you want. http://www.briandunning.com/filemaker-custom-functions/
November 4, 201312 yr Does FileMaker have a function that can format a date the way you would like? The one in the Inspector is like what I am talking about. Do you mean format a date within a text calculation? There is no native general function for that. I have a date in one of my calculations that leaves off leading zeros on days and months I want: 9/2/2013 to be 09/02/2013 Assuming it's a dd/mm/yyyy result you want, try = SerialIncrement ( "00" ; Day ( date ) ) & SerialIncrement ( "/00" ; Month ( date ) ) & "/" & Year ( date ) As soon as you do things like display a date in a merge field, or withing a calculated text string then you lose control of the date format. But you can merge a date field within a text object - and then apply date formats to the text object using the Inspector.
November 5, 201312 yr I think the OP originally posted the date to be Month Day and Year? If so I modified your calculation SerialIncrement ( "00" ; Month ( date ) ) & "/" & SerialIncrement ( "00" ; Day ( date ) )& "/" & Year ( date )
Create an account or sign in to comment