<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:36:50 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-440] DateTime in base with milliseconds. DateTime via Query - without. Query.Eq - doesn&apos;t work with DateTime properties</title>
                <link>https://jira.mongodb.org/browse/CSHARP-440</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;When I want to store DateTime it stored like:  &lt;/p&gt;

&lt;p&gt;bsonWriter.WriteString(dateTime.ToString(&quot;yyyy-MM-ddTHH:mm:ss.FFFFFFFK&quot;));&lt;/p&gt;

&lt;p&gt;Problem: &lt;br/&gt;
Now I want to query my DateTime property by Eq query. Query Serializer generate something like: &quot;Property&quot;:ISODate(&quot;2012-04-13T06:00:00Z&quot;)&lt;/p&gt;

&lt;p&gt;And I got empty result set, because dates doesn&apos;t match - date in base with milliseconds, generated date - without&lt;/p&gt;

&lt;p&gt;I can do only workaround about this:&lt;br/&gt;
&quot;DateTimeProperty&quot; : &lt;/p&gt;
{ &quot;$gte&quot; : ISODate(&quot;2012-04-13T06:00:00Z&quot;), &quot;$lt&quot; : ISODate(&quot;2012-04-13T06:00:01Z&quot;) }
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Like &quot;query Date&quot; &amp;lt;= DateTime &amp;lt;  &quot;query Date&quot; + 1 seconds (to handle milliseconds)&lt;/p&gt;

</description>
                <environment></environment>
        <key id="36064">CSHARP-440</key>
            <summary>DateTime in base with milliseconds. DateTime via Query - without. Query.Eq - doesn&apos;t work with DateTime properties</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="craig.wilson@mongodb.com">Craig Wilson</assignee>
                                    <reporter username="gfx00">Brian</reporter>
                        <labels>
                    </labels>
                <created>Thu, 12 Apr 2012 06:39:35 +0000</created>
                <updated>Thu, 2 Apr 2015 18:27:50 +0000</updated>
                            <resolved>Mon, 16 Apr 2012 14:19:28 +0000</resolved>
                                    <version>1.3.1</version>
                    <version>1.4</version>
                                    <fixVersion>1.4.1</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="110262" author="craiggwilson" created="Mon, 16 Apr 2012 15:37:28 +0000"  >&lt;p&gt;I agree that there are a lot of systems where second precision is enough.  However, there are also a lot of systems where hour precision is enough.  Context is always important when api level decisions are being made.  In this case, we can&apos;t know what type of precision is required for your queries, so we go as precise as possible and let the client decide how to query it.&lt;/p&gt;

&lt;p&gt;Anyways, thanks for your bug reports.  They are forcing us to think through decisions we are making more thoroughly.  Please keep challenging us on things you think are important as we value your opinion and experience.&lt;/p&gt;</comment>
                            <comment id="110253" author="gfx00" created="Mon, 16 Apr 2012 15:20:44 +0000"  >&lt;p&gt;I don&apos;t agree with your analogy: &quot;hours and seconds&quot; are not the same as &quot;seconds and milliseconds&quot; because there is a lot of systems where seconds precision is enough.&lt;/p&gt;

&lt;p&gt;As I mentioned before - that kind of queries should be queried via &quot;between&quot; operator. So, my bug is invalid.&lt;/p&gt;</comment>
                            <comment id="110187" author="craiggwilson" created="Mon, 16 Apr 2012 12:59:20 +0000"  >&lt;p&gt;Brian,&lt;/p&gt;

&lt;p&gt;After reading through this exchange, it appears as though your expectations of mongodb may be different than that of the typical user.  In this particular case, you are asking that an equality comparison return documents that are equal at a lower precision, something that doesn&apos;t make sense a majority of the time.&lt;/p&gt;

&lt;p&gt;Let&apos;s look at this request a little differently; instead of milliseconds and seconds, we&apos;ll use seconds and hours.  You are asking that a date stored as 1:31PM be matched by an equality comparison with 1:00PM, simply because the hours are equal.&lt;/p&gt;

&lt;p&gt;I don&apos;t think there is anyway this will get implemented in the server or the driver.  However, this is simple for you to do on your side.  If you don&apos;t need milliseconds, then don&apos;t store them.  However, the proper way to query dates is generally to use ranged queries.  In the case of mongodb, since the underlying storage structure is a B-Tree, ranged queries like this are extremely fast if there is an index on the field.&lt;/p&gt;

&lt;p&gt;Let us know if you are satisfied with closing this issue.&lt;/p&gt;</comment>
                            <comment id="109537" author="rstam" created="Fri, 13 Apr 2012 13:29:38 +0000"  >&lt;p&gt;One of the issues involved here is that .NET DateTime values have a resolution of 100 nanosecond ticks. The BSON DateTime valus are defined to have a resolution of milliseconds. That&apos;s just the way BSON is defined.&lt;/p&gt;

&lt;p&gt;When you store a .NET DateTime in the database the value has to be converted from a .NET DateTime to a BSON DateTime, and that inevitably results in a slight loss of resolution.&lt;/p&gt;

&lt;p&gt;In the sample code I provided the two values are slightly more than a second apart (not milliseconds).&lt;/p&gt;

&lt;p&gt;If when you query by DateTime you provide the SAME value that is STORED in the database then you can easily query using Query.EQ. If you use a value that doesn&apos;t match what&apos;s stored in your database then of course you won&apos;t find a match.&lt;/p&gt;

&lt;p&gt;If you don&apos;t want milliseconds stored in the database then you should set your DateTime values to DateTimes that are rounded to the nearest second in your own code.&lt;/p&gt;

&lt;p&gt;And if you do choose to store your DateTime values in millisecond precision but only want to search with second precision then your range query is the correct way to do it. A range query should perform almost as fast as EQ, and can even use an index if one is defined.&lt;/p&gt;</comment>
                            <comment id="109466" author="gfx00" created="Fri, 13 Apr 2012 09:03:15 +0000"  >&lt;p&gt;Your sample is what am I talking about:&lt;/p&gt;

&lt;p&gt;You store 2 dates with a difference in milliseconds&lt;br/&gt;
Then you query date by the SAME variable. Of cource there would be the match&lt;/p&gt;

&lt;p&gt;Now try to do next:&lt;/p&gt;
{&quot;Property&quot; : ISODate(&quot;2012-04-12T14:31:37Z&quot;)}
&lt;p&gt;And you&apos;ll found nothing&lt;/p&gt;


&lt;p&gt;I just think about this - maybe it should be right that datetime can be quered only by &quot;between&quot; query type. But if you add some MillisecondsNull serialization option then I think it can give perfomance gain because Query.EQ() works faster then Query.And(Query.GTE(),Query.LT())&lt;/p&gt;


</comment>
                            <comment id="109112" author="rstam" created="Thu, 12 Apr 2012 14:35:50 +0000"  >&lt;p&gt;The line of code you refer to is only executed if you set the serialization options so that the DateTime value is serialized as a string. That is NOT the default way. The default is to serialize the DateTime value as a BSON DateTime value.&lt;/p&gt;

&lt;p&gt;Here&apos;s some code that works for me:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;var dateTime1 = DateTime.UtcNow;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Thread.Sleep(TimeSpan.FromSeconds(1));&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;var dateTime2 = DateTime.UtcNow;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;collection.Drop();&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;collection.Insert(new BsonDocument(&quot;Property&quot;, dateTime1));&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;collection.Insert(new BsonDocument(&quot;Property&quot;, dateTime2));&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Console.WriteLine(&quot;Entire collection contents:&quot;);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;foreach (var document in collection.FindAll())&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    Console.WriteLine(document.ToJson());&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Console.WriteLine();&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Console.WriteLine(&quot;Results of query using DateTime:&quot;);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;var query = Query.EQ(&quot;Property&quot;, dateTime1);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;foreach (var document in collection.Find(query))&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    Console.WriteLine(document.ToJson());&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;This code inserts two documents with different DateTime values and then uses Query.EQ to find one of them (it works, returning the first of the two documents inserted).&lt;/p&gt;

&lt;p&gt;And the output is:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Entire collection contents:&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;_id&quot; : ObjectId(&quot;4f86e74ae447ad2af4783aa7&quot;), &quot;Property&quot; : ISODate(&quot;2012-04-12T14:31:37.251Z&quot;) }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;_id&quot; : ObjectId(&quot;4f86e74ae447ad2af4783aa8&quot;), &quot;Property&quot; : ISODate(&quot;2012-04-12T14:31:38.251Z&quot;) }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Results of query using DateTime:&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;_id&quot; : ObjectId(&quot;4f86e74ae447ad2af4783aa7&quot;), &quot;Property&quot; : ISODate(&quot;2012-04-12T14:31:37.251Z&quot;) }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;If your scenario is different can you please provide some actual code to execute?&lt;/p&gt;</comment>
                            <comment id="109104" author="gfx00" created="Thu, 12 Apr 2012 14:19:10 +0000"  >&lt;p&gt;bsonWriter.WriteString(dateTime.ToString(&quot;yyyy-MM-ddTHH:mm:ss.FFFFFFFK&quot;));&lt;/p&gt;

&lt;p&gt;This is not my serializer. It&apos;s from driver. I watched how standart DateTime serialization works and found this row.&lt;/p&gt;

&lt;p&gt;Query was written via Query.EQ();&lt;br/&gt;
It&apos;s very easy to reproduce: &lt;br/&gt;
   a) Save DateTime it would be stored like &quot;2012-04-03T12:34:55.555&quot;&lt;br/&gt;
   b) Query.EQ() with datetime property - it would be something like &quot;Property&quot;:ISODate(&quot;2012-04-03T12:34:55Z&quot;)&lt;br/&gt;
   c) Then execute this generated query with mongo.exe - record wouldn&apos;t be founded&lt;/p&gt;

&lt;p&gt;I&apos;m not Mongo expert but on my server datetime value with millisecconds is not the same as datetime without them.&lt;/p&gt;
</comment>
                            <comment id="109089" author="rstam" created="Thu, 12 Apr 2012 13:45:32 +0000"  >&lt;p&gt;Can you provide some more information (perhaps attach a sample program demonstrating your issue)?&lt;/p&gt;

&lt;p&gt;The fact that you mention a BsonWriter makes me think that you have written a custom serializer. If so, Query.EQ won&apos;t know about your custom serializer and you will have to provide the value in the same format as that written by your custom serializer.&lt;/p&gt;

&lt;p&gt;You might also look into writing the query as a LINQ query. The LINQ implementation understands custom serializers (although you have to implement some new methods added to IBsonSerializer in 1.4 for the use of the LINQ implementation).&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrh7pz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14050</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>