Skip to main content
Nintex Community Menu Bar

String was not recognized as a valid DateTime.

  • April 28, 2008
  • 4 replies
  • 23 views

Forum|alt.badge.img+8

hi,


I have created a smartObject with a field date and the value is date and time. Which format is necessary for this value?
I have tried dd.mm.yyyy hh:mm. But there I get an error message.


thx,Jochen

4 replies

Forum|alt.badge.img+7
  • April 29, 2008

Hi HTH,


I have a InfoPath Integration and my Date is an InfoPath Date - how can I use this to create a SmartBox SmartObject?


Anja


Forum|alt.badge.img+8
  • Author
  • April 29, 2008

I get still an error by setting the smartObject field "Date"
I do this by using the following code


...
DateTime term = DateTime.Now;
string time = term.AddMinutes(5).ToString("yyyy-mm-ddThh:mm:ss");


soRequest.Properties["Date"].Value = time;


soRequest.MethodToExecute = "Create";
soServer.ExecuteScalar(soRequest);

but when I set the SmartObject value an error occurs, "Exception of type 'SourceCode.SmartObjects.Client.SmartObjectException"


thx,Jochen


Forum|alt.badge.img+8
  • Author
  • April 30, 2008

Hi,
When I step through the code the error message is not created when I set the value to the smartobject. It is create within this statement
soServer.ExecuteScalar(soRequest);


But when I comment out "soRequest.Properties["Date"].Value = time;" I get no errormessage.


Jochen


Forum|alt.badge.img+8
  • Author
  • June 5, 2008

I don't know which changes I did but now it works using the code obove.


Thx,Jochen