pctechtv Posted November 4, 2013 Posted November 4, 2013 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?
truelifeajf Posted November 4, 2013 Posted November 4, 2013 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/
comment Posted November 4, 2013 Posted November 4, 2013 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.
Lee Smith Posted November 5, 2013 Posted November 5, 2013 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 )
pctechtv Posted November 5, 2013 Author Posted November 5, 2013 Never even saw SerialIncrement () before. It works great though!
Recommended Posts
This topic is 4370 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now