Friday, May 2, 2008

SharePoint bug in GetFormattedValue

I'm grabbing list values programmatically in SharePoint. On the Microsoft.SharePoint.SPListItem, I call GetFormattedValue("myFieldName") and if that field is a date, it displays the day before the date that's stored in the list. Ouch. To get around it, I used the following: ((DateTime)itm["Est. Start Date"]).ToShortDateString()

0 comments: