Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / October 2007

Tip: Looking for answers? Try searching our database.

int'l date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vinnie - 03 Oct 2007 20:54 GMT
I'm trying to use the time & date method for get it shown on te page,
but if i use the standadr format it works, while if i change it as
follow, i get two error messages:

System.Globalization.CultureInfo culture = new
System.Globalization.CultureInfo();
       System.Globalization.CultureInfo("pl-PL");

     LabelData.Text = String.Format(culture.DateTimeFormat,"Today is
{0:dd}, {0:MMMM} {0:yyyy}, {0:HH} {0:mm} {0:ss}", DateTime.Now);

The errors are:
- No overload for method 'CultureInfo' takes '0' arguments;
-'System.Globalization.CultureInfo' is a 'type', which is not valid in
the given context;

What should i change to make it working properly?

Thanks
John B - 04 Oct 2007 01:07 GMT
> I'm trying to use the time & date method for get it shown on te page,
> but if i use the standadr format it works, while if i change it as
[quoted text clipped - 15 lines]
>
> Thanks

Use the CultureInfo.GetCulture(string name) method or new
CultureInfo(string name) constructor.

> System.Globalization.CultureInfo culture = new
> System.Globalization.CultureInfo("pl-PL");
>         //System.Globalization.CultureInfo("pl-PL");

JB

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.