ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dates in Excel (https://www.excelbanter.com/excel-programming/420764-dates-excel.html)

don H. Lee

Dates in Excel
 
Hi Newsgroup

I have a big problem handling dates in excel or formatting them the right
way.

Using VBA there is no Problem but when I using formatted fields the trouble
begins.

My tool is used in several languages (german, french, italian) and when I
use localized formatting of date fields like "DD.MM.JJJJ" (for german) and
using this on french system i receive an error.

Now I made a work around and replacing (Text-replace in VBA) the formatting
with the localized format, but this isn't very nice.

Any idea how to handle this?

Thanks alot

D. H. Lee



Niek Otten

Dates in Excel
 
You don't tell how you use the format.
Is it in a TEXT() function in the worksheet? Are you entering a formula in
the worksheet through VBA?
Anyway, use the Locale option in the Formatting dialog. If you record a
macro while doing it, you can see how to do it from VBA as well.
With a literal, so a format string between qotes, you'll never get automatic
translation between languages.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"don H. Lee" wrote in message
...
Hi Newsgroup

I have a big problem handling dates in excel or formatting them the right
way.

Using VBA there is no Problem but when I using formatted fields the
trouble begins.

My tool is used in several languages (german, french, italian) and when I
use localized formatting of date fields like "DD.MM.JJJJ" (for german) and
using this on french system i receive an error.

Now I made a work around and replacing (Text-replace in VBA) the
formatting with the localized format, but this isn't very nice.

Any idea how to handle this?

Thanks alot

D. H. Lee





All times are GMT +1. The time now is 12:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com