Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Calculated Field Tip and Trick

  Asked By: Stephanie    Date: Oct 04    Category: Sharepoint    Views: 2093

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



1 Answer Found

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

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.