SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Search Server Express 2010 that is crawling web site content such as this:

<meta name="publishDate" content="04/26/2011 16:58:00" />

In search administration my tags appear in Crawled Properties as a text field: crawled property

I want to map publishDate to the lastModifiedDate property, but I can't. How can I change its type to 'date'?


Tried to do it with powershell and command Set-SPEnterpriseSearchMetadataCrawledProperty but had no luck. It says the VariantType parameter doesn't exist.

share|improve this question
up vote 4 down vote accepted

A similar question has been asked before:

The short answer involves writing your own protocol handler - not for the faint hearted, but it should work nicely.

share|improve this answer

This is how we configure crawled props (before indexing them!):

New-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $searchapp 
    -Name publishdate -Category Web 
    -IsNameEnum $false -VariantType 64 
    -PropSet "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX" -IsMappedToContents $true

Variant type is 64 - which is the date/time type. Add the correct Propset Guid.

share|improve this answer

It seems the field is of data type Text (with content which represents a date), since it's crawled as Text. If you want to use the field for dates with time, you have to set the data type of the field (the data type of the column in the list or library) to Date and Time. Then it will be crawled as a real Date and Time data type and the mapping will be possible.

When you change the column data type from Text to Date and Time a new crawled property will be created with data type Date and Time.

share|improve this answer
I've tried to create a new managed property of DateTime type. But after crawl search server creates duplicate property with the same name but string type – Sly May 20 '11 at 12:55
Of what data type is the column in the list or library which shows up as crawled property? – Anita Boerboom May 20 '11 at 13:03
crawled property comes from <meta /> tag of crawled HTML web page. Its not sharepoint content – Sly May 23 '11 at 9:21

Perhaps you should try surfacing the lastModified coulmn in your page directly?
Maybe a small section in the footer that says: Page Published with a DateTimeField surfacing the column.
This way the crawler will correctly identify the underlying datatype of the column, create the mapped property with the right variant type and you can map it as you desire.

share|improve this answer
What do you mean by surfacing? – Sly May 23 '11 at 13:42
Put a feild in the page that references the coulmn. Like this one: <SharePointWebControls:FieldValue FieldName="[FieldGuid]" runat="server"></SharePointWebControls:FieldValue > – GavinB May 25 '11 at 20:37
its not sharepoint page. Its html – Sly May 26 '11 at 6:17

Did you try to create a new crawled property with the appropriate VariantType (Date) by PowerShell command New-SPEnterpriseSearchMetadataCrawledProperty. Also, maybe the DateTime value has to be in the correct format to be parsable.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.