0

I am using sharepoint 2013 social comment web part in my custom aspx page as follows

 <SPSWC:SocialCommentWebPart runat="server"></SPSWC:SocialCommentWebPart>

Although this works fine, the commments section of this control shows , date of the comment posted in "yyyy dd mm hh mm" format.

I want to change this format to simly dd/mm/yyyy

Is it possible and how can it be done?

0

something like this

DateTime dt = DateTime.ParseExact(yourObject.ToString(), "MM/dd/yyyy hh:mm:ss tt", CultureInfo.InvariantCulture);
string s = dt.ToString("dd/M/yyyy", CultureInfo.InvariantCulture);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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