Date conversion

  • Thread starter Thread starter KK
  • Start date Start date
K

KK

Hi,

How can we convert string to date in VB.NET?

I will get date in a string "5/24/2005"
By using date operations I want to convert this date into another
string "24-May-2005". Not by using arrays.

Pls help.

Regards.
 
KK said:
How can we convert string to date in VB.NET?

I will get date in a string "5/24/2005"
By using date operations I want to convert this date into another
string "24-May-2005". Not by using arrays.

Take a look at 'Date.Parse', 'Date.ParseExact' and 'Date.ToString'.
 
KK,

I forgot this to write, date conversions are very depending on cultures.

By instance has the United States a very local datetime format not used at
much places outside the USA and English speaking Candada, except in a Coca
Cola culture way.

Therefore is the use of any datetime string in Net, which uses in my opinion
extremely well the culture/language settings of the computer, something
that you would have to avoid as much as possible.

Just my thought,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top