Search This Blog

Wednesday, November 19, 2014

Be careful when using dates in rules

When you write rules in AMODIT you need to be careful when using dates. AMODIT supports multiple languages and it influences how dates are shown and interpreted. In US English date format is mm/dd/yyyy but for example in Polish it is yyyy-mm-dd. Therefore it is risky to write:
[DateTo]>="5/2/2014"

It is better to write:
[DateTo]>=DateTime(2014,5,2)

This way you can avoid problems when user switches to another language.

No comments:

Post a Comment