maryj Posted January 3, 2012 Share Posted January 3, 2012 Can a rule be created to translate this date in the data file: 2/13/2012 To the the French version in this format: XX mois 2012 Thanks, mary Link to comment Share on other sites More sharing options...
step Posted January 3, 2012 Share Posted January 3, 2012 If you run a quick search through the forums I think you'd be able to find most of the answers to your questions. I found this code from this post where someone was looking to convert the date to Spanish. After making a few edits: function FrenchDate(myDate) { var months = ['January','February','March','April','May','June','July','August','September','October','November','December']; var month = months[myDate.getMonth()]; return myDate.getDate() + " " + month + " " + myDate.getFullYear(); } return FrenchDate(DateFromString(Field("[color="Red"]YOURDATEFIELD[/color]"))); Of course, I don't parler français so you'll need to translate the names of the months within the "months" array before you compose your file. Link to comment Share on other sites More sharing options...
maryj Posted January 3, 2012 Author Share Posted January 3, 2012 Thank you! When I paste this into the rule: var months = ['Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre']; It turns into this: var months = ['Janvier','F√©vrier','Mars','Avril','Mai','Juin','Juillet','Ao√ªt','Septembre','Octobre','Novembre','D√©cembre']; Is there a way to get the umlauts to show up correctly in the rule and in the final variable field? Thanks, Mary Link to comment Share on other sites More sharing options...
step Posted January 3, 2012 Share Posted January 3, 2012 Try typing it instead of copy and pasting it. Link to comment Share on other sites More sharing options...
maryj Posted January 3, 2012 Author Share Posted January 3, 2012 That worked. Thank you very much!!! : ) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.