Thursday, December 01, 2005
Retrieving created date from the Messageboard database
In order to read creation date of a definite message stored in the Messageboard database, the created element value from the XML should be used rather than the created_dt value.
It has the following format:
created 7/1/2003 1:18:28 PM
It's much more convenient for the futher date formatting since the created_dt value does not contain any “pm” or “am” definitions.
Then you can apply suggested code snippet in order to change the date format:
string formatedData = dt.ToString("M/d/yyyy H:mm");
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment