Click here to Skip to main content
15,926,939 members
Home / Discussions / C#
   

C#

 
AnswerRe: AD group Pin
The Man from U.N.C.L.E.13-Nov-09 11:20
The Man from U.N.C.L.E.13-Nov-09 11:20 
GeneralRe: AD group Pin
caiena16-Nov-09 3:37
caiena16-Nov-09 3:37 
QuestionTextBox Pin
farokhian13-Nov-09 10:32
farokhian13-Nov-09 10:32 
AnswerRe: TextBox Pin
Richard MacCutchan13-Nov-09 23:28
mveRichard MacCutchan13-Nov-09 23:28 
QuestionC# API Pin
rizwana rashid13-Nov-09 10:32
rizwana rashid13-Nov-09 10:32 
AnswerRe: C# API Pin
The Man from U.N.C.L.E.13-Nov-09 11:15
The Man from U.N.C.L.E.13-Nov-09 11:15 
AnswerRe: C# API Pin
Pete O'Hanlon13-Nov-09 11:40
mvePete O'Hanlon13-Nov-09 11:40 
QuestionFormatting Dates From XML file Pin
Rafone13-Nov-09 8:02
Rafone13-Nov-09 8:02 
I am reading an XML file into a dataset to be used by the Report Viewer control.   Trouble is that I can't seem to format the date that is in the dataset.
Here is what I'm trying.   The date is the second column of the data table.

            private DataTable LoadData()
            {
                  // Load data from XML file
                  DataSet ds = new DataSet();
                  DataTable tbl;
                  string myFilePath = (Application.StartupPath + "\\bin\\" + "trd.xml");
                  ds.ReadXml(myFilePath);
                  tbl = ds.Tables[0];
                  foreach (DataRow row in tbl.Rows)
                  {
                        //reformat date
                        row[1] = String.Format("{0:g}", row[1].ToString());
                  }
                        return tbl;
            }

Any help is greatly appreciated
rafone

Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...

AnswerRe: Formatting Dates From XML file Pin
Not Active13-Nov-09 8:19
mentorNot Active13-Nov-09 8:19 
GeneralRe: Formatting Dates From XML file Pin
Rafone13-Nov-09 8:33
Rafone13-Nov-09 8:33 
GeneralRe: Formatting Dates From XML file Pin
Not Active13-Nov-09 9:08
mentorNot Active13-Nov-09 9:08 
GeneralRe: Formatting Dates From XML file Pin
Rafone13-Nov-09 9:26
Rafone13-Nov-09 9:26 
GeneralRe: Formatting Dates From XML file Pin
Richard MacCutchan13-Nov-09 9:25
mveRichard MacCutchan13-Nov-09 9:25 
GeneralRe: Formatting Dates From XML file Pin
Rafone13-Nov-09 9:28
Rafone13-Nov-09 9:28 
GeneralRe: Formatting Dates From XML file Pin
Richard MacCutchan13-Nov-09 9:55
mveRichard MacCutchan13-Nov-09 9:55 
GeneralRe: Formatting Dates From XML file Pin
PIEBALDconsult13-Nov-09 12:50
mvePIEBALDconsult13-Nov-09 12:50 
QuestionWindow forms Pin
Morgs Morgan13-Nov-09 7:10
Morgs Morgan13-Nov-09 7:10 
AnswerRe: Window forms Pin
Xelalem13-Nov-09 7:19
Xelalem13-Nov-09 7:19 
GeneralRe: Window forms Pin
Morgs Morgan13-Nov-09 9:59
Morgs Morgan13-Nov-09 9:59 
AnswerRe: Window forms Pin
Eddy Vluggen13-Nov-09 7:20
professionalEddy Vluggen13-Nov-09 7:20 
GeneralRe: Window forms Pin
Paulo Zemek13-Nov-09 7:33
Paulo Zemek13-Nov-09 7:33 
GeneralRe: Window forms Pin
Morgs Morgan13-Nov-09 7:44
Morgs Morgan13-Nov-09 7:44 
AnswerRe: Window forms Pin
Shameel13-Nov-09 7:39
professionalShameel13-Nov-09 7:39 
GeneralRe: Window forms Pin
Morgs Morgan13-Nov-09 9:53
Morgs Morgan13-Nov-09 9:53 
QuestionThread Abort Pin
manustone13-Nov-09 7:06
manustone13-Nov-09 7:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.