Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have an external list containing a datetime column called "Opening". I would like to show only the time portion of this column in all views (list, edit etc.). I know how to do this in the list view, by use of the "edit formula" in sharepoint designer (design view). Is this also possible in the one-item-views? There seems to be no "edit formula" available here.

I tried to change the form field to datetimefield as follows:

<SharePoint:DateTimeField TimeOnly="True" Grid.Column="1" Grid.Row="7" ControlMode="Display" FieldName="Opening" IncludeDescription="True"></SharePoint:DateTimeField>

but despite of TimeOnly="true", the date portion is still shown. Is customizing of the forms possible?

share|improve this question

2 Answers 2

Customizing the form is one aspect - that happens in the list already (unless you do provision your Forms with your solution), but I believe you are looking at doing it declaratively. There is no way as exposed to do it declaratively as only Date is supported, but you could opt for creating a calculated column that uses any of the formulas as exposed here http://abstractspaces.wordpress.com/2009/05/02/common-date-time-formulas-for-sharepoint-calculated-fields/ - the downside is that it is Read-Only.

My take: If you want to "Edit" it either go for customizing the Edit forms or programatically go for a Custom field.

share|improve this answer
    
Hi C. Marius, do you mean by "customizing the Edit forms" to create a new edit form in sharepoint designer? –  AGuyCalledGerald Dec 5 '12 at 11:16
    
Indeed. Greater flexibility is gained, e.g. all functions to process DateTime available in the ddwrt library, XSLT, and many more –  C. Marius - MVP Dec 8 '12 at 20:15
up vote 0 down vote accepted

It is possible by manipulating the xpath expression of the fields and using javascript as shown in this article.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.