By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,588 Members | 1,089 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,588 IT Pros & Developers. It's quick & easy.

Problem CultureInfo

P: n/a
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
Share this Question
Share on Google+
2 Replies

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.