<h2>SCOM - Events generated from SCOM showing "Time Of Event" field with Future Date.</h2><br/><div style="overflow-x:auto"><article><div ><h3 >Issue </h3><section><ul style="list-style-position: inside;"><li>The instance is using the OOTB SCOM connector Instance and Connector Definition to pull events from Source. The connector is pulling the data successfully but the final generated event has Time Of Event field showing a future date. Please refer to the below screenshot.</li></ul> <p style="padding-left: 80px;"><img style="border: 2px solid black; align: baseline;" src="sys_attachment.do?sys_id=69947449dbccb8d066e0a345ca961951" width="963" height="374" align="baseline" border="2" /></p></section></div><div ><h3 >Cause</h3><section><ul style="list-style-position: inside;"><li>The root cause of the issue is the DateFormat field set on the connector Instance Record. The code refers "M/d/yyyy/ h:mm:ss a" as default format but this needs to be changed based on the format of the incoming event. </li><li>For SCOM, the system looks for the Last-Modified Field's value as an input to "Time of Event Field".</li></ul> <p style="padding-left: 80px;"><img style="border: 2px solid black; align: baseline;" src="sys_attachment.do?sys_id=e1947449dbccb8d066e0a345ca961950" width="963" height="374" align="baseline" border="2" /><br /><br /></p></section></div><div ><h3 >Resolution</h3><section><ul style="list-style-position: inside;"><li>In order to resolve this issue, we need to change the Data format. Out of the Box, we have "<span style="text-decoration: underline;"><strong>M/d/yyyy/ h:mm:ss a</strong></span>"</li><li>We have changed the date format in the connector to <span style="text-decoration: underline;"><strong>d/M/yyyy/ h:mm:ss a</strong></span>. to reflect the formatting similar to the LastModifiedDate field.</li><li>After doing this, we see that events are getting created with a valid date.</li></ul> <p style="padding-left: 80px;"><img style="border: 2px solid black; align: baseline;" src="sys_attachment.do?sys_id=6d947449dbccb8d066e0a345ca96194e" width="963" height="374" align="baseline" border="2" /></p> <p style="padding-left: 80px;"> </p> <p style="padding-left: 40px;"><span style="color: #ffffff; background-color: #0000ff;">Note</span>: while setting the date format, make sure you add (single) d and not dd. same applies with M. if you have dd or mm then result may vary and you may see invalid date.</p></section></div></article></div>