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.

First day of the month format in French

Featured Replies

In French, the first day of the month should be formatted like this "le 1er juin 2012" even if all the other days of the month don't take a suffix and are like this "le 2 juin 2012". FM's date formatting functions don't allow this. However i 'm sure there is a calculation or a custom function that could do the trick, I just can't figure out how to do it. If anyone has any ideas to get me started, I'd love to here them.

Try this:

let (



[ myDay = Day ( myDate ) ;



myYear = Year (myDate ) ;



myMonthName = MonthName (myDate ) ;



theSuffix = if ( Day ( myDate ) = 1 ; "er " ; " " ) ] ;



"le " & myDay & theSuffix & myMonthName & ", " & myYear



)

Put it in a Custom Function as e.g. FormattedDate ( myDate ).

Note that Month name uses the date settings of your system, so you must extend this

if you wanted to always get the month name in French, regardless of the user's settings.

  • Author

Great. Thanks a lot. That works like a charm.

  • Author

For a widely international solution to this problem, check out http://www.fmfunctions.com/functions_display_record.php?functionId=316

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.