Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Calculated Field Tip and Trick

  Asked By: Stephanie Wilson         Date: Oct 04, 2006      Category: Sharepoint      Views: 332
 

I just figured out a trick. Maybe everyone knows how to do it, but, in case you don’t, I thought I would share it.

I’ve always found it annoying that, when you try to create a Year calculated field, such as

=year([Start Date])
the year ends up being displayed as 2,006


I just figured out, however, that if you write the calculated field as follows:

=year([Start Date]) & “”

it will instead display as 2006

Tagged:          

 

1 Answer Found

 
Answer #1       Answered By: Mary Adams          Answered On: Oct 04, 2006       

You used implicit casting of the number to a string; an old and
well-worn Visual Basic trick.

 
Didn't find what you were looking for? Find more on Calculated Field Tip and Trick Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].