on 07-09-2007 5:20 PM
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
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");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanx! That was it!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.