Converting first to 1st etc for date using cond format
I have a successful formula working that converts a date to read in text as "the second week of June" for example for a date field that is 9/6/12.
However, I want this text to be altered slightly based on another field.
Here is my explanation - I have a field, called
Invoiceitems_INVOICE::Due Date Est
It has two entries - Either "exact' or Approx. If Approx, I want the field called
Invoiceitems_INVOICE::Due Date (date field) to be broken down to read first/second/third week etc. This bit works. I want to alter it so that if the Due date field reads
"exact", then the actual date in the due date field reads - the first of September etc right up to the 31st of July. (I am having trouble with getting the 21st,22nd, 23rd and 31st to display proerly - wt the moment myexisting formula shows them as 31th)
My Cond format script is below. Any help appreciated..on these two questions.
(Let ( [ d = Invoiceitems_INVOICE::Month week ; $$number = If ( d < 5 ;
Choose ( d ; "" ;
"We anticipate your product being ready by the first week of " ;
"We anticipate your product being ready by the second week of " ;
"We anticipate your fender being ready by the third week of " ) ;
"We anticipate your product being ready by the last week of " )
& Invoiceitems_INVOICE::Month & ", and will advise you nearer the time. Please do not hesitate to telephone or email us if you would like to know how your product is progressing.
Our order reference is given above." ] ; True )