in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

whallify's blog

A fix for Annoying Date/Time fields in lists (Modified, Created, etc)

If you're like me, you probably don't like the fact that sharepoint will automatically show the date and time like

You should patch your system           Wayne Hall          05/04/2004 12:00:00am

So, what you can do is create a new column with your list called “timestamp” that is a calculated formula with the following:

=TEXT(WEEKDAY(Modified),"ddd")&" "&TEXT(Modified,"h:mm")

That way it just prints “Tue 5:03”, which is a lot easier to read, especially when looking at, say a view that shows the most recent 5 documents added to a document library or something.

 

If I get time, maybe I'll figure out how to do something that analyzes it to say ... if it's < 7 days old, do the day and time, and if it's older, do MM/DD.  The problem I run into is that it won't let you do [today] or [me] in calculated columns.  Maybe I need to do that in xslt?

IE,

=IF([TODAY]-Modified<=7,
TEXT(WEEKDAY(Modified),"ddd")&" "&TEXT(Modified,"h:mm"),TEXT(Modified,"mm/dd"))

Comments

No Comments

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts