2007-06-26

DateTime Culture

Step 1 import globalization namespace in your class.

Imports System.Globalization

Step 2 Sample Code for thai Language.

Dim pYourCulturrInfo As New CultureInfo("th-TH")

'Get Year format

Dim nYourCultureYear As Integer = pYourCulturrInfo.Calendar.GetYear(DateTime.Now)


'Get all month name

Dim pYourDateTimeFormat As DateTimeFormatInfo = pYourCulturrInfo.DateTimeFormat

Dim sYourMonthName(11) As String

For i As Integer = 1 To 12

sYourMonthName(i - 1) = pYourDateTimeFormat.GetMonthName(i)
Next i


'Get all days in month

Dim nDays As Integer = pYourCulturrInfo.Calendar.GetDaysInMonth(DateTime.Now.Year, DateTime.Now.Month)




6 comments:

Ahmad Halim Sholeh said...

wow...really amazing...time is money....time is culture...

Anonymous said...

Hello, i read your blog occasionally and i own a similar one and i was just wondering if you
get a lot of spam comments? If so how do you prevent it, any plugin or anything
you can advise? I get so much lately it's driving me crazy so any assistance is very much appreciated.


Also visit my site; exercises for jumping higher ()

Anonymous said...

First of all I want to say excellent blog!
I had a quick question which I'd like to ask if you do not mind.
I was interested to find out how you center yourself and clear your mind prior to
writing. I've had difficulty clearing my mind in getting my thoughts out.
I truly do enjoy writing however it just seems like the first 10 to 15 minutes are lost just trying to figure out how to begin. Any suggestions or hints?
Thank you!

Here is my webpage: famington hills tooth whitening

Anonymous said...

Greetings! Very useful advice in this particular article! It is
the little changes that will make the most significant changes.
Thanks for sharing!

My homepage - buy used cars in ct

Anonymous said...

The changing levels switches the screen shots and really highlights how modern technology, and furthermore hack sites allow you to build large and prosperity, as well
the ability to pay more attention on game designing. Android is the
battle of Harry Potter has come with GPS receivers, Bluetooth, infrared
head soccer hack or any other platform to develop more
sports.

my weblog ... head soccer cheats

morris said...

Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work!!! psiprograms.com