<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: String was not recognized as a valid DateTime error in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/string-was-not-recognized-as-a-valid-datetime-error/qaa-p/13831898#M4862741</link>
    <description>&lt;P&gt;Thanks, that option command worked.  I thought I had executed that statement, but I realize now I probably left off the "PUBLIC." part of it.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jan 2014 08:57:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-01-06T08:57:10Z</dc:date>
    <item>
      <title>String was not recognized as a valid DateTime error</title>
      <link>https://community.sap.com/t5/technology-q-a/string-was-not-recognized-as-a-valid-datetime-error/qaq-p/13831896</link>
      <description>&lt;P&gt;I recently needed to test our program on Windows XP because of a bug that was specific to that OS.  So I rebooted a laptop we have that can boot either XP or Windows 8 into XP and installed our software.&lt;/P&gt;
&lt;P&gt;Since then, our back-end has been generating "String was not recognized as a valid DateTime" exceptions when the code tries to retrieve data from the database using the Entity Framework Model.  Note that the same code works fine on later versions of Windows and other machines running XP.  There must be something different about the settings on this laptop.&lt;/P&gt;
&lt;P&gt;This error is happening in several different places, but one place it's happening is in the following code:&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="n"&gt;using&lt;/SPAN&gt; &lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;CarSystemEntities&lt;/SPAN&gt; &lt;SPAN class="n"&gt;context&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="k"&gt;new&lt;/SPAN&gt; &lt;SPAN class="n"&gt;CarSystemEntities&lt;/SPAN&gt;&lt;SPAN class="p"&gt;()&lt;/SPAN&gt; &lt;SPAN class="p"&gt;)&lt;/SPAN&gt; &lt;SPAN class="p"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="n"&gt;IQueryable&lt;/SPAN&gt;&lt;SPAN class="sr"&gt;&amp;lt;CarSystem.Site&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="n"&gt;childSites&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;context&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Sites&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Where&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;s&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="n"&gt;s&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;ParentId&lt;/SPAN&gt; &lt;SPAN class="o"&gt;==&lt;/SPAN&gt; &lt;SPAN class="n"&gt;SiteId&lt;/SPAN&gt; &lt;SPAN class="o"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt; &lt;SPAN class="n"&gt;s&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;FromVersion&lt;/SPAN&gt; &lt;SPAN class="o"&gt;==&lt;/SPAN&gt; &lt;SPAN class="n"&gt;null&lt;/SPAN&gt; &lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
    &lt;SPAN class="k"&gt;if&lt;/SPAN&gt; &lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;childSites&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Count&lt;/SPAN&gt;&lt;SPAN class="p"&gt;()&lt;/SPAN&gt; &lt;SPAN class="o"&gt;==&lt;/SPAN&gt; &lt;SPAN class="mi"&gt;0&lt;/SPAN&gt; &lt;SPAN class="p"&gt;)&lt;/SPAN&gt; &lt;SPAN class="p"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="n"&gt;StartAutoConfigurationMode&lt;/SPAN&gt;&lt;SPAN class="p"&gt;();&lt;/SPAN&gt;
    &lt;SPAN class="p"&gt;}&lt;/SPAN&gt; &lt;SPAN class="k"&gt;else&lt;/SPAN&gt; &lt;SPAN class="p"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="k"&gt;foreach&lt;/SPAN&gt; &lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;CarSystem&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Site&lt;/SPAN&gt; &lt;SPAN class="n"&gt;child&lt;/SPAN&gt; &lt;SPAN class="n"&gt;in&lt;/SPAN&gt; &lt;SPAN class="n"&gt;childSites&lt;/SPAN&gt; &lt;SPAN class="p"&gt;)&lt;/SPAN&gt; &lt;SPAN class="p"&gt;{&lt;/SPAN&gt; &lt;SPAN class="sr"&gt;//&lt;/SPAN&gt; &lt;SPAN class="o"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;Error&lt;/SPAN&gt; &lt;SPAN class="n"&gt;happens&lt;/SPAN&gt; &lt;SPAN class="n"&gt;here&lt;/SPAN&gt;
            &lt;SPAN class="n"&gt;BuildModule&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;context&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="n"&gt;child&lt;/SPAN&gt; &lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
        &lt;SPAN class="p"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="p"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="p"&gt;}&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;The laptop's region is set to en-US.  All of the region settings are fine.  The application is receiving data from our server and inserting it into the local database properly, so the code in that module is fine.  And, as I said, it runs fine on other versions of Windows.  It even runs fine on Windows 8 on the same laptop.&lt;/P&gt;
&lt;P&gt;We're using SA 12.0.1.3697.
Anybody got any suggestions?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2014 12:26:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/string-was-not-recognized-as-a-valid-datetime-error/qaq-p/13831896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-03T12:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: String was not recognized as a valid DateTime error</title>
      <link>https://community.sap.com/t5/technology-q-a/string-was-not-recognized-as-a-valid-datetime-error/qaa-p/13831897#M4862740</link>
      <description>&lt;P&gt;Hi Tony,&lt;/P&gt;
&lt;P&gt;This could be caused by &lt;A href="http://search.sybase.com/kbx/changerequests?bug_id=746575"&gt;CR#746575&lt;/A&gt; which is fixed in &lt;A href="http://downloads.sybase.com/swd/detail.do?baseprod=144&amp;amp;client=ianywhere&amp;amp;relid=17540"&gt;12.0.1.3971 and later&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;As a workaround, you should be able to execute:&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="n"&gt;SET&lt;/SPAN&gt; &lt;SPAN class="n"&gt;OPTION&lt;/SPAN&gt; &lt;SPAN class="n"&gt;PUBLIC&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;timestamp_with_time_zone_format&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s"&gt;'YYYY-MM-DD HH:NN:SS.SSSSSS+HH:NN'&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;on the server to ensure that the correct time stamp format is set for every connection.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2014 13:07:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/string-was-not-recognized-as-a-valid-datetime-error/qaa-p/13831897#M4862740</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-03T13:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: String was not recognized as a valid DateTime error</title>
      <link>https://community.sap.com/t5/technology-q-a/string-was-not-recognized-as-a-valid-datetime-error/qaa-p/13831898#M4862741</link>
      <description>&lt;P&gt;Thanks, that option command worked.  I thought I had executed that statement, but I realize now I probably left off the "PUBLIC." part of it.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2014 08:57:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/string-was-not-recognized-as-a-valid-datetime-error/qaa-p/13831898#M4862741</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-06T08:57:10Z</dc:date>
    </item>
  </channel>
</rss>

