Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Translate dates in different formats


LingoJango

Recommended Posts

Hi everyone,

 

I just uploaded my first custom function to Brian Dunning's website and I'm really proud of it so I have to tell everyone. So Cool!

 

Here's the link to the function.

 

It all began with the fact that Windows can't do Catalan text dates properly, because it fails to put in an apostrophe before the month names that begin with a vowel.

 

Then it all began to balloon and get out of hand with Case statements all over, but finally I managed to come up with something that is, crucially, easy to manage when you need to add more languages, since you only have to enter new month and weekday lists in one place. It also defaults elegantly if the language ISO code isn't recognized, and allows for other date formats to be easily added. (Well, dates in the Western calendar in Latin-character languages, at least; can't vouch for anything else.)

 

Oh, and even though that's a very simple calc, it can also supply a 1 for Monday, 2 for Tuesday, etc. I did that for internal purposes, so the lists can be entered in the order that most people recite the days of the week, but it's also one possible output that can be used in other functions. I'll probably add a simplified call function just for this purpose.

 

Hope others can get something out of it. I just entered the four languages I know I'll be using, but it's really easy to adjust.

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use