Calculation with dates and different locales in Crystal Reports for Eclipse?
Posted
by Bevor
on Stack Overflow
See other posts from Stack Overflow
or by Bevor
Published on 2010-05-11T06:47:50Z
Indexed on
2010/05/11
6:54 UTC
Read the original article
Hit count: 293
crystal-reports
|eclipse
Hello, I'm using Crystal Reports for Eclipse 2.0.4 and I have a problem. I use a formula in an report to subtract one day from a string which is a date:
ToText(CDate({Agreement.EndDate})-1, "dd.MM.yyyy");
This works for the German locale. With an English locale, the calculation is absolutely wrong because the day and month is interchanged. For example: When {Agreement.EndDate} is 07.05.2010 and I subtract one day from it, I get 06.04.2010 with the German locale but 04.07.2010 with an English locale. How can I solve this that I works for different locales?
© Stack Overflow or respective owner