Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I currently have a simple external content type that displays a very small sql table on a external list in my SharePoint site. The problem is I have a date of birth field that gets formatted with the DateTime type instead of the Date type that is used when I created the SQL table. The biggest issue I am facing is the lack of designer view in SharePoint Designer 2013 that was included in 2010. Since I am forced to work with the source code, how do I go about formatting the date of birth fields so that it is displayed in simple Date format example: 01/01/2001. And also prevent the time from showing when adding or entering a new record to the list.

share|improve this question

1 Answer

You could use a SELECT LEFTSQL statement to pull just the relevant information. Are you familiar with this method?

For clarification, here's an example:

CDate(Left([FieldName],10)

While being sure to change [FieldName] to match the field's name in your table.

share|improve this answer
Yes I am familiar with that method, but I am trying to achieve a consistent Date format in all aspects of the external list not just when it reads but also when a user enters a new record and is asked for the date of birth. Currently when a user enters a new record or edits a new record through the site, it asks for date of birth Date as well as the time. – Guillermo yesterday

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.