• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1275
  • Last Modified:

ERROR: Incorrect data type for operator or @Function: Time/Date expected

I am attempting to categorize documents based on an EffectiveDate (mm/dd/yyyy), by Year.  Within the column of the view, I have the formula, "@Year(EffectiveDate)" intending to grab and display the year of this field.  Most of the documents fall into the proper twisty of the year (1994, 1997, 2000, 2004, etc.).  However, some documents are grouped under the twisty: "ERROR: Incorrect data type for operator or @Function: Time/Date expected".  I have looked at the form in which the documents were created from, and especially this field.  The field is a Date/Time & Computed.

For a document that appeared with the twisty: "Error...", I made the field "Editable", and typed in a new EffectiveDate.  Upon saving, the document still appeared on the "Error..." twisty.

Can you help me out?

Thank you.  
0
JBouse
Asked:
JBouse
  • 3
1 Solution
 
HemanthaKumarCommented:
try this

@Year(@texttotime(EffectiveDate))

~Hemanth
0
 
HemanthaKumarCommented:
And one more thing to check is the doc properties and see what is the data type for EffectiveDate field.. if it is text then my above formula would work as it does conversion to date/time before it extracts year part. Or else if you have mixed document where the properly working docs show that field as date and others show as text, then you have to rectify the error documents by changing the type of the field to date/time and then run toolsrefreshSelecteddocs command in an agent or re-save them again
0
 
JBouseAuthor Commented:
Okay.  This is strange and I just don't understand, but, the issue just went away.  All those documents that appeared under the "Error..." twisty are now properly sorted into the proper twisties.  I have the above code on file in case this ever happens again.  Thanks for your help (I wish all other system issues took care of themselves like this one).
0
 
HemanthaKumarCommented:
No Magic happens Jbouse, there is something that we have missed.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now