Querying by DateTime in RavenDB

If you are using RavenDb studio to query for documents then you are using the Lucene syntax.

When Raven stores a  .net Date time it is formatted according to .Net convention but to query for this value you must convert to the Lucene format

Raven(.Net) 2014-04-05T00:00:00.0000000
Lucene      20140405000000000
As you can see all the dots and dashes are removed to make the datetime lucene friendly.

Simple date query
MyDateProperty: 20130625000000000

Date Range Query

MyDateProperty: [20130625000000000 TO 20130629000000000]