<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: DateTime in Webservice</title><link>https://answers.axonivy.com/questions/3291/datetime-in-webservice</link><description>&lt;p&gt;Hello Ivy Team,
   we use one field with type DateTime in result by Web Service Process start. If there is null in this field, we receive always initialized Value&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; &amp;lt;result&amp;gt;
            &amp;lt;exportTimestamp&amp;gt;0001-01-01T00:00:00+01:00&amp;lt;/exportTimestamp&amp;gt;
 &amp;lt;/result&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What is wrong on it?&lt;/p&gt;
&lt;p&gt;I would expected, the section exportTimestamp would not be created (similar like with Type String).&lt;/p&gt;
&lt;p&gt;Thank you for response in advance.&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3291/datetime-in-webservice" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 01 Jun 2018 03:23:26 -0400</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/3291/datetime-in-webservice/3299</link><description>&lt;p&gt;&lt;code&gt;0001-01-01T00:00:00+01:00&lt;/code&gt; reflects the 'auto initialized' value of DateTime objects. &lt;/p&gt;
&lt;p&gt;You can filter these values if you do it in the generated WebServiceProcess-Pojo:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Copy the generated WebServiceProcess implementation from &lt;code&gt;src_wsproc&lt;/code&gt; into your own &lt;code&gt;src&lt;/code&gt; directory. From now on the source will not be re-generated on service changes in the process. Take care to keep the service interface in sync manually...&lt;/li&gt;
&lt;li&gt;Now add a simple IF statement that filters auto-initialized values. E.g. &lt;code&gt;if (IvyDefaultValues.isDefaultObject(exporTs))&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/filterAutoInitFields.png"&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Fri, 01 Jun 2018 03:23:26 -0400</pubDate><guid>https://answers.axonivy.com/questions/3291/datetime-in-webservice/3299</guid></item></channel></rss>