Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Format a date when not in layout mode?

Featured Replies

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?

 

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/

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.

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 )
  • Author

Never even saw SerialIncrement () before. It works great though!

Yeh, that function is new to me as well.

Version 7 seems so long ago now.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.