473,398 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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 DateTimeFormatInfo = New CultureInfo("it-IT",
False).DateTimeFormat
Dim ItCulture As CultureInfo = New CultureInfo("it-IT", False)
ItCulture.DateTimeFormat = DtInfo
DataOutput = DateTime.Parse(DataFromVerify, ItCulture)

How do?

Nov 21 '05 #1
2 1262
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.CultureInfo.CreateSpecificCulture("i t-IT").DateTimeFormat)
~

HTH
Roman

"Giorgio" <giorgio@.it> ñîîáùèë/ñîîáùèëà â íîâîñòÿõ ñëåäóþùåå:
news:uk**************@TK2MSFTNGP15.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 DateTimeFormatInfo = New CultureInfo("it-IT",
False).DateTimeFormat
Dim ItCulture As CultureInfo = New CultureInfo("it-IT", False)
ItCulture.DateTimeFormat = 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
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...
2
by: choyk1 | last post by:
Hi all, I cannot serialize CultureInfo property as below. It invokes InvalidOperationException. public class One { private CultureInfo culture;
5
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.). ...
3
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. ...
7
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...
0
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...
4
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...
17
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...
8
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...
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.