Is there a better way to format this date string
Posted
by Mark Breen
on Stack Overflow
See other posts from Stack Overflow
or by Mark Breen
Published on 2010-06-11T20:46:47Z
Indexed on
2010/06/11
20:52 UTC
Read the original article
Hit count: 175
Hello
is there are better way to structure this line of code, as you can see, I am changing the format of a string that contains a date.
lblCourseStartDate.Text = String.Format("{0:D}", DateTime.Parse(CourseStartDate));
I just found it untidy that I am converting twice or three times to get the format I want.
Thanks
© Stack Overflow or respective owner