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!

Date Field assistance (if possible)

Status
Not open for further replies.

TechUser23

IS-IT--Management
Mar 8, 2007
28
US
I am having to do a Spanish and an English version of a report. I personally do not speak spanish. The client provided me the text they needed and I added that into my report ...

The only issue is this ... they want the Date field to Print as such ( Friday, August 10, 2007 ) ....

This is simple to do in the English one and looks fine ... issue is on the spanish one, its printing this in English. Is it possible to convert into spanish? Not terribly important, just looks tacky to have it all in spanish but this one field. Any help is appreciated.
 
You could do it by Replace, but that would be very long-winded. Better would be to use date-parts to get the correct Spanish names. E.g.
Code:
if DatePart ("d", {date1}) = 1 then "SpanishforSunday"
else 
if DatePart ("d", {date1}) = 2 then "SpanishforMondayday"
Likewise for month:
Code:
if Month({date1}) = 1 then "SpanishforJanuary"
else 
if Month({date1}) = 2 then "SpanishforFebruart"
Get the code working and then fill in the correct Spanish names. Stitch the bits together,
Code:
@SpanishDay & ", " & @SpanishMonth & " " & ToText({date}, "MM, yyyy")


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
PS. It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top