cancel
Showing results for 
Search instead for 
Did you mean: 

converting Month to French

Former Member
0 Kudos

I have a report currently with a English Letter and a french letter. On the French letter i need the Date to come out in French. On the English Letter i am using the Print Date Special Field right now. I am not sure how i can code the in below into the report.

can i please get some help

French date format: le dd month, yyyy Example: le 25 décembre, 2009

English to french conversion;

January janvier

February février

March mars

April avril

May mai

June juin

July juillet

August août

September septembre

October octobre

November novembre

December décembre

Accepted Solutions (1)

Accepted Solutions (1)

former_member292966
Active Contributor
0 Kudos

Hi Divyesh,

This formula works for me.

//"le 3 février 2009";

"le " & ToText (Day (Today), 0, "", "") & " " & 
    ["janvier", "février", "mars", "avril", "mai", "juin", 
    "julliet", "août", "septembre", "octobre", "novembre", "dècembre"] & ", " &  [Month (Today)] & " " & 
ToText (Year (Today), 0, "", "");

Former Member
0 Kudos

Question for Brian,

Interesting formula...

How does your formula know which French month to select?

Thanks,

Zack H.

former_member292966
Active Contributor
0 Kudos

Hi Zack,

That's a good question. Looks like I messed up the array.

//"le 3 février 2009";
 
"le " & ToText (Day (Today), 0, "", "") & " " & 
    ["janvier", "février", "mars", "avril", "mai", "juin", 
    "julliet", "août", "septembre", "octobre", "novembre", "dècembre"] [Month (Today)] & ", " & 
ToText (Year (Today), 0, "", "");

That will work now.

Former Member
0 Kudos

the [Month (Today)] portion of the formula tells you which month to select.

An similar formula is also in the crystal help file - Dayofweek function at the bottom. This has been around as long as I can remember even when I work at Crystal.

Answers (1)

Answers (1)

Former Member
0 Kudos

I imagine you have a code, fieldname, or parameter that triggers whether the output will be English or French. Depending on the trigger, you may use the following technique to accomplish what you are looking for.

Formula name is @French Month


if month({Print Date Special Field}=1 then
"janvier" else 
if month({Print Date Special Field}=2 then
"février" etc..

Then create another formula that will print the French Date as such:


"le "+totext(day({Print Date Special Field})+" "+{@French Month}+" "+totext(year({Print Date Special Field}),"####")

Remember, you might need to change your PC's Regional Settings to French in order to get the special French characters to come out in Crystal.

I hope this helps,

Regards,

Zack H.