Global Time Setting

  • Thread starter Thread starter Arvind P Rangan
  • Start date Start date
A

Arvind P Rangan

Hi,

I like to know can i display time of other countries when my server doesnot
belong to that server.
E.g. i want to display time of US when my Server is in UK.

Is there any setting we can do at application level.

Kindly let me know.
Urgent.

Thanks
Arvind.
 
Hi Arvin,

Setting the time to US time is very difficult (because there are more US
times), here a link how to do what you want and some information about
globalization.

http://msdn.microsoft.com/library/d...frlrfsystemtimezoneclassgetutcoffsettopic.asp


I hope this helps?

Cor

\\\set culture
Dim myCIintl As New System.Globalization.CultureInfo("nl-NL")
Application.CurrentCulture = myCIintl
'or
Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US")
///

\\\time in other format
Me.Text = Now.ToString("D", New System.Globalization.CultureInfo("es-ES"))
I hope this helps a little bit?

\\\Info
Dim Info As System.Globalization.DateTimeFormatInfo
Info = System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat
MsgBox(Info.DateSeparator)

I hope this helps a little bit?

Cor
 
If you are interested only in the formatting of the time, then look at the Globalization namespace and CurrentCulture property of the thread. If you are interested in Time Conversion, then use the artilce Cor pointed to and then you will need to convert to the target timezone via code.

Rgds,
Anand
VB.NET MVP
http://www.dotnetindia.com
 
How do you get the actual star next to your name when you're an MVP?
Is it via some certificate authority?

If not, how can anyone get one.
It's alright for actual MVPs if they are told how to do it but what about people who want a star that aren't actually an MVP?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top