I am accessing data from an API, and it returns the date value in the JSON as formatted as 2014-12-01. I have assigned this to the class and bound to a textblock within a listbox control, and it displays fine. However, is there a way that I can display the date in the format "Thursday 20th Decemeber 2014".
I am using c# .NET for windows phone 8. Code Snippet below on how the data is returned.
while (count < ja.Count) {
SkiddleEvents content = new SkiddleEvents();
//EVENT DETAILS
if (ja[count]["imageurl"] != null) {
content.str_eventImage = ja[count]["imageurl"].ToString();
}
else {
Uri imageUrl = new Uri("/Assets/placeholder.jpg", UriKind.Relative);
content.str_eventImage = imageUrl.ToString();
}
content.str_eventID = ja[count]["id"].ToString();
content.str_eventName = ja[count]["eventname"].ToString();
content.str_eventDate = ja[count]["date"].ToString();
content.str_eventAddress = ja[count]["venue"]["address"].ToString() + ", " + ja[count]["venue"]["town"].ToString();
content.str_venueID = ja[count]["venue"]["id"].ToString();
//add the content to the list box and increase the count
contentList.Add(content);
count++;
}