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.

5 Answers 5


A similar question has been asked before: https://stackoverflow.com/questions/166178/searching-date-meta-tags-in-sharepoint

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


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.


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.

  • 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, 2011 at 12:55
  • Of what data type is the column in the list or library which shows up as crawled property? May 20, 2011 at 13:03
  • crawled property comes from <meta /> tag of crawled HTML web page. Its not sharepoint content
    – Sly
    May 23, 2011 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.

  • What do you mean by surfacing?
    – Sly
    May 23, 2011 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, 2011 at 20:37
  • its not sharepoint page. Its html
    – Sly
    May 26, 2011 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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