It seems that the error comes if you enter the Z/T to the end of parse string.<br>-------------------------------------------------------------------------<br>CODE 1:<br>System.Globalization.CultureInfo provider = new System.Globalization.CultureInfo(&quot;tr-TR&quot;);<br>


<br>DateTime dt = DateTime.ParseExact( &quot;1984-09-17T09:00:00&quot;, &quot;yyyy-MM-dd&#39;T&#39;HH:mm:ss.FFF&quot;,provider);<br>-------------------------------------------------------------------------<br>OUTPPUT 2:<br>


9/17/1984 9:00:00 AM<br>-------------------------------------------------------------------------<br>CODE 2:<br>System.Globalization.CultureInfo provider = new System.Globalization.CultureInfo(&quot;tr-TR&quot;);<br> DateTime dt = DateTime.ParseExact( &quot;1984-09-17T09:00:00Z&quot;, &quot;yyyy-MM-dd&#39;T&#39;HH:mm:ss.FFF&#39;Z&#39;&quot;,provider);<br>


-------------------------------------------------------------------------<br>OUTPPUT 2:<br>Unhandled Exception: System.FormatException: Invalid format string<br>  at System.DateTime.ParseExact (System.String s, System.String[] formats, IFor<br>


atProvider provider, DateTimeStyles style) [0x00000] in &lt;filename unknown&gt;:0<br>  at System.DateTime.ParseExact (System.String s, System.String format, IFormat<br>rovider provider, DateTimeStyles style) [0x00000] in &lt;filename unknown&gt;:0<br>


  at System.DateTime.ParseExact (System.String s, System.String format, IFormat<br>rovider provider) [0x00000] in &lt;filename unknown&gt;:0<br>  at testDate.Program.Main (System.String[] args) [0x00000] in &lt;filename unknow<br>


&gt;:0<br>-------------------------------------------------------------------------<br>MONO VER: (testted for both versions)<br>Mono JIT compiler version 2.10.2 (tarball)<br>
Copyright (C) 2002-2011 Novell, Inc and Contributors. <a href="http://www.mono-project.co" target="_blank">www.mono-project.co</a><br>
        TLS:           normal<br>
        SIGSEGV:       normal<br>
        Notification:  Thread + polling<br>
        Architecture:  x86<br>
        Disabled:      none<br>
        Misc:          softdebug<br>
        LLVM:          supported, not enabled.<br>
        GC:            Included Boehm (with typed GC and Parallel Mark)<br>-------------------------------------------------------------------------<br><br><div class="gmail_quote">On Thu, Sep 22, 2011 at 4:55 PM, Nicklas Overgaard <span dir="ltr">&lt;<a href="mailto:nicklas@isharp.dk" target="_blank">nicklas@isharp.dk</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Thanks, wasen&#39;t sure of the bug report url after novell&#39;s demise.<br>
    <br>
    Posted as bug: <a href="http://bugzilla.xamarin.com/show_bug.cgi?id=992" target="_blank">http://bugzilla.xamarin.com/show_bug.cgi?id=992</a><br><font color="#888888">
    <br>
    /Nicklas</font><div><div></div><div><br>
    <br>
    On 2011-09-22 12:39, Marek Safar wrote:
    <blockquote type="cite">
      
      Hi,<br>
      <br>
      Please fill a bug report at <a href="http://bugzilla.xamarin.com/" target="_blank">http://bugzilla.xamarin.com/</a><br>
      <br>
      Thanks<br>
      Marek<br>
      <blockquote type="cite">
        Nodbody?<br>
        <br>
        Anywho, since it&#39;s an incompability with .net I guess that I
        should file a bug somewhere?<br>
        <br>
        Best regards,<br>
        <br>
        Nicklas<br>
        <br>
        On 2011-09-19 00:04, Nicklas Overgaard wrote:
        <blockquote type="cite">
          
          Yes, i&#39;m very sure - it&#39;s copy-paste from the solrnet source
          code:
          
          <a href="https://github.com/mausch/SolrNet/blob/master/SolrNet/Impl/FieldParsers/DateTimeFieldParser.cs" target="_blank">https://github.com/mausch/SolrNet/blob/master/SolrNet/Impl/FieldParsers/DateTimeFieldParser.cs</a><br>



          <br>
          And the code-snippet I attached below does indeed work on
          windows in .net :)<br>
          <br>
          /Nicklas<br>
          <br>
          On 2011-09-18 23:00, Stefano Canepa wrote:
          <blockquote type="cite">
            <pre>Nicklas Overgaard  at &quot;Sun, 18 Sep 2011 18:34:08 +0200&quot; wrote:
 NO&gt; Hi,

 NO&gt; I&#39;m currently working with Solr and SolrNet for a project. However, i&#39;m 
 NO&gt; encountering errors when SolrNet is parsing date times...

 NO&gt; I have located the date-time parsing code in SolrNet, and made a sample 
 NO&gt; test application shown below:

 NO&gt; &lt;code start&gt;
 NO&gt; using System;
 NO&gt; using System.Linq;
 NO&gt; using System.Globalization;

 NO&gt; namespace datetimeparsing
 NO&gt; {
 NO&gt;      class MainClass
 NO&gt;      {
 NO&gt;          public static void Main (string[] args)
 NO&gt;          {
 NO&gt;              string s = &quot;1984-09-17T09:00:00Z&quot;;
 NO&gt;              DateTime dt=  DateTime.ParseExact(s, 
 NO&gt; &quot;yyyy-MM-dd&#39;T&#39;HH:mm:ss.FFF&#39;Z&#39;&quot;, CultureInfo.InvariantCulture);
 NO&gt;          }
 NO&gt;      }
 NO&gt; }
 NO&gt; &lt;/code end&gt;

Are you sure about the format string? I think that you need to write only
FF&#39;Z instead of FFF&#39;Z. Did you take a look at mono source code?

Bye
Stefano

</pre>
          </blockquote>
          <br>
          <br>
          <fieldset></fieldset>
          <br>
          <pre>_______________________________________________
Mono-devel-list mailing list
<a href="mailto:Mono-devel-list@lists.ximian.com" target="_blank">Mono-devel-list@lists.ximian.com</a>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a>
</pre>
        </blockquote>
        <br>
        <pre><fieldset></fieldset>
_______________________________________________
Mono-devel-list mailing list
<a href="mailto:Mono-devel-list@lists.ximian.com" target="_blank">Mono-devel-list@lists.ximian.com</a>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Mono-devel-list mailing list
<a href="mailto:Mono-devel-list@lists.ximian.com" target="_blank">Mono-devel-list@lists.ximian.com</a>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
Mono-devel-list mailing list<br>
<a href="mailto:Mono-devel-list@lists.ximian.com" target="_blank">Mono-devel-list@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Hüseyin Çakır<br><br><br>