Hi,
I just migrated my project to PB 2017 1681 and run into an error because the behavior of the powerscript function date(string) appears to be changed. In PB 12.6 this:
date('2018-01-53') returns 1900-01-01, what I need.
But in PB 2017 it returns 2018-01-05.
I couldn't find any information about changes. Does anyone know something about?
Thanks,
Andre
Nevertheless, thank you Michael!
Nevertheless, it is a workaround.
- - - - Further testing revealed:
Invalid date in general returns 1900-01-01
IF value is invalid date BUT (value having last character removed) is valid
THEN this truncated value is returned
ELSE 1900-01-01 is returned
Examples
2018-13-01 => 1900-01-01
2012-12-153 => 2012-12-15
2018-10-310 => 2018-10-31
2018-09-310 => 1900-01-01
2018-09-309 => 2018-09-30
2018-09-43 => 2018-09-04
2018-09-4X => 2018-09-04