Click here to Skip to main content
15,922,630 members
Home / Discussions / C#
   

C#

 
GeneralRe: Delete selected attribute in HTML Pin
Parwej Ahamad19-Jan-09 5:30
professionalParwej Ahamad19-Jan-09 5:30 
GeneralRe: Delete selected attribute in HTML Pin
trinm198719-Jan-09 5:37
trinm198719-Jan-09 5:37 
GeneralRe: Delete selected attribute in HTML Pin
Parwej Ahamad19-Jan-09 5:39
professionalParwej Ahamad19-Jan-09 5:39 
GeneralRe: Delete selected attribute in HTML Pin
trinm198719-Jan-09 5:44
trinm198719-Jan-09 5:44 
QuestionReturn Multiple Rows of the same Student Id (PK) Pin
ferronrsmith19-Jan-09 4:28
ferronrsmith19-Jan-09 4:28 
AnswerRe: Return Multiple Rows of the same Student Id (PK) Pin
Christian Graus19-Jan-09 4:33
protectorChristian Graus19-Jan-09 4:33 
GeneralRe: Return Multiple Rows of the same Student Id (PK) Pin
ferronrsmith19-Jan-09 4:36
ferronrsmith19-Jan-09 4:36 
AnswerRe: Return Multiple Rows of the same Student Id (PK) Pin
Herman<T>.Instance19-Jan-09 4:43
Herman<T>.Instance19-Jan-09 4:43 
GeneralRe: Return Multiple Rows of the same Student Id (PK) Pin
ferronrsmith19-Jan-09 6:17
ferronrsmith19-Jan-09 6:17 
AnswerRe: Return Multiple Rows of the same Student Id (PK) Pin
Wendelius19-Jan-09 7:49
mentorWendelius19-Jan-09 7:49 
GeneralRe: Return Multiple Rows of the same Student Id (PK) Pin
ferronrsmith19-Jan-09 9:08
ferronrsmith19-Jan-09 9:08 
GeneralRe: Return Multiple Rows of the same Student Id (PK) Pin
Wendelius19-Jan-09 9:15
mentorWendelius19-Jan-09 9:15 
GeneralRe: Return Multiple Rows of the same Student Id (PK) Pin
ferronrsmith20-Jan-09 14:37
ferronrsmith20-Jan-09 14:37 
GeneralRe: Return Multiple Rows of the same Student Id (PK) [forum redirect] Pin
Wendelius20-Jan-09 17:58
mentorWendelius20-Jan-09 17:58 
QuestionPrint Multiple instances of the same form Pin
ferronrsmith19-Jan-09 4:16
ferronrsmith19-Jan-09 4:16 
AnswerRe: Print Multiple instances of the same form Pin
Christian Graus19-Jan-09 4:34
protectorChristian Graus19-Jan-09 4:34 
AnswerRe: Print Multiple instances of the same form Pin
#realJSOP19-Jan-09 4:41
professional#realJSOP19-Jan-09 4:41 
GeneralRe: Print Multiple instances of the same form Pin
ferronrsmith19-Jan-09 9:10
ferronrsmith19-Jan-09 9:10 
GeneralRe: Print Multiple instances of the same form Pin
#realJSOP19-Jan-09 9:16
professional#realJSOP19-Jan-09 9:16 
QuestionProblem with com creation in C# Pin
Arish rivlin19-Jan-09 3:00
Arish rivlin19-Jan-09 3:00 
AnswerRe: Problem with com creation in C# Pin
Not Active19-Jan-09 3:20
mentorNot Active19-Jan-09 3:20 
QuestionHow to get the list of Href Links From HTML Pin
wasimsharp19-Jan-09 2:39
wasimsharp19-Jan-09 2:39 
AnswerRe: How to get the list of Href Links From HTML Pin
Paddy Boyd19-Jan-09 2:42
Paddy Boyd19-Jan-09 2:42 
AnswerRe: How to get the list of Href Links From HTML Pin
J a a n s19-Jan-09 3:52
professionalJ a a n s19-Jan-09 3:52 
QuestionCultureInfo and DateTime settings Pin
Rick van Woudenberg19-Jan-09 2:33
Rick van Woudenberg19-Jan-09 2:33 
Gents,

I have the following problem that drives me insane. I've written a service that runs in the background. However, I can't get the DateTime format right. I must have tried everything to get it right, but to no avail. When the service starts or stops, it will tell me by writing to a log file. The output of the log file looks like this :

1/19/2009 1:48:40 PM Manager: Service Stopped<br />
1/19/2009 1:48:43 PM Manager: Service Started<br />
1/19/2009 2:17:05 PM Manager: Service Stopped<br />
1/19/2009 2:17:29 PM Manager: Service Started<br />
1/19/2009 2:18:02 PM Manager: Service Stopped<br />
1/19/2009 2:20:27 PM Manager: Service Started


Now .. When it writes to the logfile, it uses the above format for DateTime.Now , while I want to use "dd-mm-yyyy HH:mm:ss"
I set the regional setting in Control Panel as well as the Date and Time format. It shows up perfect in my system clock. It still spits out the above to the logfile. Then I tried the following in my code, so set it programmatically :

// The main entry point for the process
static void Main()
{
    //Set the culture
    CultureInfo newCulture = new CultureInfo("en-US", false);
    newCulture.DateTimeFormat.FullDateTimePattern = "dd-mm-yyyy HH:mm:ss";
    System.Threading.Thread.CurrentThread.CurrentCulture = newCulture;

    System.ServiceProcess.ServiceBase[] ServicesToRun;
    // More than one user Service may run within the same process. To add
    // another service to this process, change the following line to
    // create a second service object. For example,
    //
    // ServicesToRun = New System.ServiceProcess.ServiceBase[] {new WinService1(), new ySecondUserService()};
    //
    ServicesToRun = new System.ServiceProcess.ServiceBase[] { new RealTime() };
    System.ServiceProcess.ServiceBase.Run(ServicesToRun);
}


That didn't fix it .. still the same output.
When I put a MessageBox in between somewhere to let me show DateTime.Now.ToString(), it also comes back with 1/19/2009 2:20:27 PM. Some of the methods in the service report an invalid <code>DateTime</code> conversion when I try the following code :

DateTime time = Convert.ToDateTime("19-01-2009 13:12:56");


It drives me insane. Can please someone point me in the right direction ?

Kind regards,

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.