Changing SharePoint 2010 lookup column Date Time and Number formatting

Few days back I was creating a report using SharePoint 2010 list as data source in Report Builder 3. The list I was using had the following lookup columns:

  • StartDate (DateTime Column)
  • FinishDate (DateTime Column)
  • Budget (Number)

Now when I tried to change the datetime and number formatting, I noticed formatting was not being applied.

After spending some time I found out that in order to apply number and datetime formatting to lookup columns, they must be converted to a proper data type. So instead of binding field directly to a column, I used the following expressions to convert these lookup columns in proper data types

Convert SharePoint 2010 lookup column to proper data type

The complete list of conversion functions can be found under Common functions and then Conversion. In my case for dates I used CDate(FieldName) and for number column I used CInt(FieldName)

Convert SharePoint 2010 lookup column to proper data type

About these ads

About Khurram Punjwani

Khurram Punjwani is a passionate .NET / SharePoint Consultant who specializes in delivering extensible solutions using agile methodologies. View all posts by Khurram Punjwani

One response to “Changing SharePoint 2010 lookup column Date Time and Number formatting

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 139 other followers

%d bloggers like this: