cancel
Showing results for 
Search instead for 
Did you mean: 

invalid date value [131-183] error

Former Member
0 Kudos

I'm trying to move a "DateTime" data item from a DB to an "EditText" item in a form and I keep getting the error mentioned above. Below is the C# code. What am I doing wrong?

oItem = oForm.Items.Item("9");

oEdit = ((EditText)(oItem.Specific));

sString = vData.dPEDate.ToString();

oDate = DateTime.Parse(sString);

oEdit.Value = oDate.ToString();

This should be easy but I haven't been able to get it to work.

HELP!

Thanx,

Tim

Accepted Solutions (1)

Accepted Solutions (1)

rasmuswulff_jensen
Active Contributor
0 Kudos
oEdit.Value = oDate.ToString();

is the problem... the Tostring Method gives a format that the SDK can't understand... Try this instead

oEdit.Value = oDate.ToString("yyyyMMdd");

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanx! That was it!