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

Date in Spanish

Status
Not open for further replies.

Nunina

Programmer
Mar 5, 2003
128
PR
Hi Guys!!!

I need to translate a date. For example, if my user enters 08/20/2004, I need it to read 20 de agosto de 2004, instead of August 20, 2004, WITHOUT me having to change the system settings.

Does anyone knows how to do this, without entering into a long, long SELECT --> CASE routine?

Thanks a lot!!!!

[gorgeous]

Issys Pouerie
Systems Support Analyst
San Juan, Puerto Rico
 
It wouldn't be too long of a select case statement.
Forgive me if I misspell any of the months.
Code:
Function SpaMth(engDate As Date)
    Select Case Month(rng)
        Case 1
            mth = "Enero"
        Case 2
            mth = "Febrero"
        Case 3
            mth = "Marzo"
        Case 4
            mth = "Abril"
        Case 5
            mth = "Mayo"
        Case 6
            mth = "Junio"
        Case 7
            mth = "Julio"
        Case 8
            mth = "Agosto"
        Case 9
            mth = "Septiembre"
        Case 10
            mth = "Octubre"
        Case 11
            mth = "Noviembre"
        Case 12
            mth = "Deciembre"
      End Select
  SpaMth = Day(rng) & " de " & mth & " de " & Year(rng)
End Function

HTH,
Eric
 
Thanks, luceze!

But isn't there a built-in function to do this???



[gorgeous]

Issys Pouerie
Systems Support Analyst
San Juan, Puerto Rico
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top