I recently had a User enter a data of 6/13/204. SQL Server 2008 happily stored the date. The date was later retrieved and serialized to WDDX. It was encoded as
<field name='BASECYCLEDATE'><dateTime>204-6-13T0:0:0-8:0</dateTime></field>
Later when I deserialized it, I get
WDDX packet parse error at line 1, column 8772..
Invalid date string 204-6-13T0:0:0-8:0.
...
614 : </cfscript>
615 :
616 : <cfwddx action = "wddx2cfml" input = "#qryLabel.Config#" output = "stDat">
My question is, what is the minimum date to deserialize dates in WDDX?
Edit:
To answer your original question, that encoded string is wrong. The serialized dates should be in ISO8601 format, meaning they should have four digit years. A cursory test suggests cfwddx
rejects any non-four digit years ie years < 1000 or > 9999.
SQL Server stores the date as 0204.
No, sql server does not store dates as formatted strings. Internally, they are stored as numbers. Ignoring validation for a moment, the cause is strictly on the CF side. When serializing that date into a wddx string, CF fails to generate the leading zero required by ISO8601. So the resulting string 204-6-13T0:0:0-8:0
is malformed and that is why the deserialization fails. That said, since that date range is not valid for your application, you should probably add some validation to reject invalid values like that one.