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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date formats in different language .. IIf or some other way?

Status
Not open for further replies.

Ravensleach

Programmer
Oct 19, 2004
45
PE
Hi

I am working in English language Access but I need to produce a report in Spanish language. I am trying to find a way to represent date fields in the following format: dd-mmmm-yyyy. I've tried extracting the month and using an iif expression to convert it but can't get it to work. I think the problem is in the date format ... here is an example of the partial expression ... can anyone help? What should the ????? be?

Code:
Expr1: IIf([MonthProjectStart] Like "?????","enero",IIf([MonthProjectStart] Like "?????","febrero"))

etc. etc.

Many thanks

 
I'd use a Month_Name table with the month number as primary key.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Sorry, I didn't understand that as a solution. Maybe I didn't explain properly. This table has a lot of date fields. If we were all working in English that wouldn't be a problem, I could set the format of the field in the report to mm/dd/yyyy or dd/mmmm/yyyy which would give us for the sake of argument 7/4/2007 or 4 July 2007. I need the same date to appear like this on a report: 4 de julio 2007.

Thanks
 
He means:

[tt]
TranslationTable
MonthNumber SpanishName
7 de julio
8 de august
[/tt]

then you can extract the month number from your date field and join into the Translation table to get the Spanish text you need.

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for database developers:
The Fundamentals of Relational Database Design
Understanding SQL Joins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top