Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 13th, 2004, 04:59 AM
Authorized User
 
Join Date: Jun 2004
Location: Aurangabad, Maharashtra, India.
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default Why CultureInfo?

Hi,

Can anybody explain me what exactly this CultureInfo all about.
What if I just wanted to format a date in different style. Should I have to use this CustureInfo and this is only solution or, does .Net Framework provide some other functions to do that.

In VB6 it was very easy, just put a format function and put the string stating style you want. or other way was to use formatdatetime.

why should i use this difficult method to just to change the date formatting



Vinod Pawar
Software Developer
India
__________________
Vinod Pawar
United States
 
Old August 13th, 2004, 09:50 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I am not VERY familiar with the CultureInfo... But I would say to use it because it gives you flexibility to make many changes based on the "culture", not just the date.

Of course, you can do the quick and dirty method and reformat the date and time- but I'd rather do it the complete and better way.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old August 13th, 2004, 09:58 AM
jminatel's Avatar
Wrox Staff
Points: 17,906, Level: 58
Points: 17,906, Level: 58 Points: 17,906, Level: 58 Points: 17,906, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
Default

Vinod:
Have you looked at any of the information at:
http://www.dotnet247.com/247referenc...ltureInfo.aspx
regarding localization and culture info? Doug Sevin's article:
http://www.dotnet247.com/247referenc...3D2EDD38B.dcik
looks especially relevent.

Also, is your question really in regard to this in .NET 2.0? i.e. are you asking this question in the right forum here at p2p.wrox.com or would one of our other forums be better suited? Just checking.



Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Jim's Book of the week: ASP.NET 2.0 Beta Preview
 
Old August 13th, 2004, 11:26 PM
Authorized User
 
Join Date: Jun 2004
Location: Aurangabad, Maharashtra, India.
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,

Sorry Jim, I should not have put this question in here rather I would have gone for an appropriate forum.

I'll take care of this in future.

Vinod Pawar
Software Developer
India
 
Old August 14th, 2004, 05:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

In regards to dates and currencies, CultureInfo has the capabilities to do "translate" the dates. This class does this, but I don't know if there is others. Sometimes, one of the overloaded methods allows for a param of CultureInfo, which that's all you have to pass in.

Brian




Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to serialize CultureInfo object cgbissio C# 0 July 17th, 2003 10:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.