Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Writing out the date


Recommended Posts

I have a need to fill in a form with the date in this format...


on the _____ day of ___________________________, 2006


How can I script FMP 8.5 to recognize the current date (ie 9/19/06) and write it out in the format listed above?

Link to comment
Share on other sites

In Layout Mode, click the date field, go to Format, go to Date, click Custom;


In the first (empty by default) box type "on the ".


For the top row pick the number ("25")


Replace the default comma to the right of it with " day of ".


Leave the next row as the default, month name ("December")


Replace the empty box to the right of it with a comma and a space.


On the next row, pick the year (as whole year — "2003").


Make everything subseqent to that blank.



EDIT: Ermm, " day of " is too long to be accepted into the delimiter box. OK, where I told you to put " day of ", just put " day ". On the next line pick and in the box following put " of ".


Next line = Monthname ("December") and ", ".


Last and final line = year ("2003").

Link to comment
Share on other sites

You can use a calculation field with a text result:


Day ( dateField )  & 

Case ( Day ( dateField ) = 1 or Day ( dateField ) = 21 or Day ( dateField ) = 31; "st";
Day ( dateField ) = 2 or Day ( dateField ) = 22; "nd";
Day ( dateField ) = 3 or Day ( dateField ) = 33; "rd";

& " day of " & MonthName ( dateField ) & ", " & Year ( dateField )


Or if you prefer the Let structure to make it easier to read and troubleshoot:


Let (d = Day ( dateField ) ;
d  & 
Case ( d=1 or d=21 or d=31; "st"; d=2 or d=22; "nd"; d=3 or d=33; "rd";"th")
& " day of " & MonthName ( dateField ) & ", " & Year ( dateField )


Note that this returns the date in the format 21st day of September, 2006 i.e. with the appropriate st, nd, rd or th suffix on the date number.


Merge the calculation field in on the layout. :cool:

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

Terms of Use