It is not recommended to convert date values in non-U.S. notation from the String data type to the DateTime data type in scripts:
Value = CDate("2014-12-31")
This always causes a problem if the script is running on a U.S. system. In the best case, you are sent an error message like "Cast from string...to type Date is not valid". In the worst case, the wrong date is returned as month and day are swapped (3.12.2014 becomes 12.3.2014).
If possible, you should avoid a string conversion altogether in this case. The DateTime type provides several constructors for this purpose. For the example above, that would be:
Value = new DateTime(2014, 12, 31)
However, if the data type String is to be used, the ISO date notation should be applied as this is converted correctly in all settings:
Value = CDate("2014-12-31")
Value = CDate("2014-12-31 15:22:12")
The complicated version is to input the language code format for the date:
Value = DateTime.Parse("12.31.2014", new CultureInfo("en-US"))
Value = DateTime.ParseExact("12.31.2014", "mm.dd.yyyy", CultureInfo.InvariantCulture)