473,651 Members | 2,518 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem CultureInfo

I would to format the date in Italian ...(dd/mm/yyyy)

I have set an another language in International setting(for test i have set
Lettonia)
The format date for this nation is yyyy.mm.dd ...

I write this code for trasformation but not it works :

Dim DtInfo As DateTimeFormatI nfo = New CultureInfo("it-IT",
False).DateTime Format
Dim ItCulture As CultureInfo = New CultureInfo("it-IT", False)
ItCulture.DateT imeFormat = DtInfo
DataOutput = DateTime.Parse( DataFromVerify, ItCulture)

How do?

Nov 21 '05 #1
2 1271
Giorgio,

Probably do you have for testing purpose a computer with an English OS.

Normally should on an computer with an Italian OS the date be displayed as
dd/mm/yyyy

In my opinion it is better to avoid as much as possible to set hard codings
of cultures in your program.

I hope this helps,

Copr
Nov 21 '05 #2
Hi,

Try this:

~
DataOutPut = DateTime.Parse( DataFromVerify,
Globalization.C ultureInfo.Crea teSpecificCultu re("it-IT").DateTimeFo rmat)
~

HTH
Roman

"Giorgio" <giorgio@.it> ñîîáùèë/ñîîáùèëà â íîâîñòÿõ ñëåäóþùåå:
news:uk******** ******@TK2MSFTN GP15.phx.gbl...
I would to format the date in Italian ...(dd/mm/yyyy)

I have set an another language in International setting(for test i have set Lettonia)
The format date for this nation is yyyy.mm.dd ...

I write this code for trasformation but not it works :

Dim DtInfo As DateTimeFormatI nfo = New CultureInfo("it-IT",
False).DateTime Format
Dim ItCulture As CultureInfo = New CultureInfo("it-IT", False)
ItCulture.DateT imeFormat = DtInfo
DataOutput = DateTime.Parse( DataFromVerify, ItCulture)

How do?

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3293
by: Willie wjb | last post by:
Hi, i have a client program that sends a filter expression to the server PC. On that server PC this filter is put over a datatable and the result is send back. the server can be located on a PC with let's say ddmmyyyy windows date format and the client has mmddyyyy. when the filter expression send is "Date < #31/01/2003#", it will fail on
2
6309
by: choyk1 | last post by:
Hi all, I cannot serialize CultureInfo property as below. It invokes InvalidOperationException. public class One { private CultureInfo culture;
5
12623
by: Adam Klobukowski | last post by:
Hello I need to convert some strings int doubles. Unfortunetly strings do not follow my country culture standarts (we use , to separate decimal from fraction, but strings use . there etc.). Also, I have to convert those doubles back to strings, and I need to use other standars then my culture (ie. use . instead of ,).
3
1155
by: Miguel Dias Moura | last post by:
Hello, i have a Calendar Control in my web site and when it's in my computer the months and weekdays are in portuguese. When i change it to my server the months and weekdays change to english. Do you think i can solve this by changing culture in my web.config file? If yes, can you tell me what should be the code to include in the web.config file to force my culture to portuguese?
7
3311
by: kingski | last post by:
Any idea about this ? http://www.developerfusion.co.uk/forums/thread/114379/#114379 "Can any one help me as i am building a shopping cart and it supports multiple currencies but while sending confirmation mail o customer it does not show euro sign before amount he paid but it is showing a queston mark over there. It is working fine with Dollar sign and Pound Sign but this Euro is creating problem. " thanks.
0
1126
by: Maran | last post by:
We have come across a situation that I thinks not many have. Grateful for all responses. Regards Maran ************* * Scenario A DataList binds to a DataRow, with "RegionName" och "RegionShortName",
4
6263
by: Dirk Behnke | last post by:
How can I start a new process with a different CultureInfo? I have tried already to set the CultureInfo of the thread starting the new process before creating the Process object, but it doesn't help.
17
2265
by: Terry Olsen | last post by:
Given that variable dt = "3/31/2007", why does it produce the following exception on some machines? It works fine on my PC, but others have sent me this exception information because it threw up on their PC. DLDT.Columns("Date").DataType = GetType(Date) dr.Item("Date") = Date.Parse(dt.Trim).ToShortDateString System.ArgumentException: The string was not recognized as a valid DateTime. Couldn't store <3/31/2007in Date Column. Expected...
8
15041
by: =?Utf-8?B?T2xpdmllciBHSUw=?= | last post by:
Hello, I try to convert a volume stored as a string value in an XML file into a Decimal object. The volume is stored with comma as decimal separator ("210,12") according to french habits. To be independent from the culture of the current user, I use decimal.Parse(volume, new System.Globalization.CultureInfo("fr-FR", true)); but this function fails with : Exception : Input string was not in a correct format.
0
1767
by: ramesh.nrk | last post by:
Hi, I am developing a windows application which should support different language for this I am using "Resource Manager" default in .net framework. Here I am developing dll for Resource because there are different application which can access one dll avoid duplications. Resource File Name : Resources/MyAppResource.de.resx
0
8349
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8795
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8695
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8460
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8576
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4281
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.