Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Translating English date to Spanish date

Status
Not open for further replies.

smsherman

Technical User
Jun 8, 2005
21
US
I need to develop a formula that will translate an English numerical date into the appropriate Spanish equivalent written out in long form.

Thus, I need to turn 01/05/2005 (January 5, 2005) into "5 de enero, 2005. (enero is the Spanish word for Jan)

Any suggestions on a plan of attack?

Is there a way to substitute elements within the date with other character sets?

Your help is always appreciated, thank you. Crystal 9 platform.
 
You could write a formula or a custom function to return a Date as the Spanish date.

Code:
StringVar Array Months := ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"];

ToText(Day({Table.DateField}),0) + " de " + Months[Month({Table.DateField})] + ", " + ToText(Year({Table.DateField}),0,"");

-dave
 
Simply brilliant! Thank you, thank you, thank you.

May you live a long life and keep all your hair and teeth!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top