Sharepoint By Dummies

See Also:

Displaying ‘Unknown’ in a date field when date isn’t known

with one comment

We have a site on Sharepoint 2010 where some of the lists have a date field but the correct value for that field isn’t known for some records.  Because of the nature of the users we do need to display something in that field even if it’s known.  This field has to be a date as it’s used in date comparisons and arithmatic (e.g. filter for when a date is past or within 12 months and apply alerters depending on if it’s passed, in the near future or further in the future) so we can’t insert the string ‘Unknown’.  We do also need, again due to the nature of someof the users, to display a meaningful string in the views, i.e. the string ‘Unknown’.

The workarouind we’ve come up with is to specify that unknown dates will be recorded as 01/01/1900 (this date will never legitmately be recorded in this sytem as an actual date) and set that as the default.  The users who will be entering data are more techie and will be instructed to use that date to mark unknown dates.  In the views that will be accessed by the non-techie users we inserted the string ‘Unknown’ into the table cell just after the data field.  Then we selected the data field and set coinditional formatting to hide it when the value is 01/01/1900, finally we selected the string ‘Unknown’ and set conditional formatting to show it when the value is 01/01/1900.  If the date is a known date it will then display the date, if it’s unknown (so set to 01/01/1900) it displays ‘Unknown’.

Not perfect but it does the job.


Written by stephenboothuk

February 14, 2012 at 2:51 pm

One Response

Subscribe to comments with RSS.

  1. This is exactly what I was thinking of doing if there wasn’t a built in method. A little javascript-fu will do the trick

    Andy Dudley

    December 21, 2012 at 4:40 pm

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

Speeches I Would Have Given

What I would have said at conference

Blogging about dyspraxia, aiming to raise much needed awareness a bit at a time as well as hopefully helping others along the way.

David Hunt, PE... Mechanical Engineer on the loose!

VALUE = Creativity + Diverse Experience + Critical Thinking

Not Literally Productions

Comedy, parody, tutorials and more!


A personal blog about having Asperger's

Dementia and Elderly Care News

News and research of interest to people involved in Dementia and Elderly Care

Marc D Anderson's Blog

A Knowledge Management Zealot Speaks Out

Codeless Solutions for SharePoint

Bryon Wyly is a SharePoint Developer dedicated to finding the limits to out-of the-box SharePoint solutions

the political blog of gordon lyew

SharePoint Business Analyst

Just another weblog

%d bloggers like this: