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

C#

 
QuestionRegarding 70-315 Pin
Mirunab9-Nov-06 1:56
Mirunab9-Nov-06 1:56 
AnswerRe: Regarding 70-315 Pin
Colin Angus Mackay9-Nov-06 3:27
Colin Angus Mackay9-Nov-06 3:27 
GeneralRe: Regarding 70-315 Pin
Mirunab10-Nov-06 2:46
Mirunab10-Nov-06 2:46 
GeneralRe: Regarding 70-315 Pin
Colin Angus Mackay10-Nov-06 8:43
Colin Angus Mackay10-Nov-06 8:43 
QuestionHow to check an internet connection Pin
CodeItWell9-Nov-06 1:34
CodeItWell9-Nov-06 1:34 
AnswerRe: How to check an internet connection Pin
mertkan659-Nov-06 2:40
mertkan659-Nov-06 2:40 
QuestionTreeview problem [modified] Pin
Suhas Bothe9-Nov-06 1:33
Suhas Bothe9-Nov-06 1:33 
AnswerRe: Treeview problem Pin
Robert Rohde9-Nov-06 2:05
Robert Rohde9-Nov-06 2:05 
GeneralRe: Treeview problem Pin
Suhas Bothe9-Nov-06 2:24
Suhas Bothe9-Nov-06 2:24 
GeneralRe: Treeview problem Pin
Robert Rohde9-Nov-06 3:00
Robert Rohde9-Nov-06 3:00 
GeneralRe: Treeview problem Pin
Suhas Bothe9-Nov-06 2:28
Suhas Bothe9-Nov-06 2:28 
GeneralRe: Treeview problem Pin
vinSharp9-Nov-06 22:42
vinSharp9-Nov-06 22:42 
QuestionMulti Monitor Application Pin
blackpenny159-Nov-06 1:24
blackpenny159-Nov-06 1:24 
AnswerRe: Multi Monitor Application Pin
mav.northwind10-Nov-06 20:44
mav.northwind10-Nov-06 20:44 
QuestionIs there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 0:46
Support1239-Nov-06 0:46 
AnswerRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
rah_sin9-Nov-06 0:54
professionalrah_sin9-Nov-06 0:54 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 1:03
Support1239-Nov-06 1:03 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
rah_sin9-Nov-06 1:33
professionalrah_sin9-Nov-06 1:33 
AnswerRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Colin Angus Mackay9-Nov-06 1:00
Colin Angus Mackay9-Nov-06 1:00 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 1:09
Support1239-Nov-06 1:09 
AnswerRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Hunuman9-Nov-06 1:29
Hunuman9-Nov-06 1:29 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 1:44
Support1239-Nov-06 1:44 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Colin Angus Mackay9-Nov-06 6:59
Colin Angus Mackay9-Nov-06 6:59 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Pete O'Hanlon9-Nov-06 1:45
mvePete O'Hanlon9-Nov-06 1:45 
Naruto

You've asked the same question several times. I think you need to provide a little bit more information before we can help you.

Here's a few things to answer/think about:

What type of application is this? Is it WinForms or ASP.NET?
How are you attempting to print out the date? Have you printed out the DateTime.ToLongTimeString() to see if the time is there. BTW - you can't have a value of 14:00:00 PM;)

As I stated in an earlier answer to you, I suspect that your problem is the CurrentCulture. If you are using ASP.NET, then it is entirely possible that the problem is because the culture of the user that ASP.NET runs under is different to yours. To solve this, you can use a "clever" trick to sort this out.

In your Page_Load method, call the following routine:

public static void SetCulture(HttpRequest req)<br />
{<br />
  if (req != null && req.UserLanguages != null && req.UserLanguages.Length > 0)<br />
  {<br />
    SetCulture((string)req.UserLanguages[0]);<br />
  }<br />
}<br />
<br />
public static void SetCulture(string culture)<br />
{<br />
  CultureInfo ci = new CultureInfo(culture);<br />
  Thread.CurrentThread.CurrentCulture = ci;<br />
  Thread.CurrentThread.CurrentUICulture = ci;<br />
}

If you call the first method, the user will get data presented to them in the culture that they have set up on their machine. So, somebody from France would probably get information back for the culture fr-FR. Now, calling the second method means that you can specify the culture explicitly, and the user will get information back in that culture, so the same French user would get back information with GB settings if you called SetCulture("en-GB");

Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."

Deja View - the feeling that you've seen this post before.

GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 2:12
Support1239-Nov-06 2:12 

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.