I am trying to implement the solr query using .NET but i am getting bad request when i try to connect to the solr for search since my date format is wrong.Can any one tell me the exact syntax to create a date format in .net
Created_Dt :[12/12/2008 3:45 PM TO *]
SolrNet already does the conversion to Solr time format for you, you only need to work with the standard
DateTime
type:I could get the solr date format using the code below,
This works fine and I can search using the date range now..
You need to search based on a UTC timestmap. Here is some example .NET code to generate it:
And a query using your example field that would use that format:
Also, make sure you convert your dates to UTC format before you store them.