dysong3 Posted June 1, 2012 Posted June 1, 2012 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.
eos Posted June 1, 2012 Posted June 1, 2012 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.
dysong3 Posted June 6, 2012 Author Posted June 6, 2012 For a widely international solution to this problem, check out http://www.fmfunctions.com/functions_display_record.php?functionId=316
Recommended Posts
This topic is 4889 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