Converting to Date format.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a string which has a value "2/14/2005". I need to convert this string
to "2-14-2005" format. How can i do this conversion?

Regards
G.V.Srinivasa Rao.
 
Srinivasa.

You are asking this in the AdoNet newsgroups, what is the destination you
are converting to?

Because when it is not a database value, than I think that a dotnet.language
newsgroup is a better place for your question.

Cor
 
hai

if you have the string stored in lets say

Dim string1 as string = "3/12/2004"

then what you have to do is

create a new variable of datatype datetime

Dim dobdatetime As DateTime = DateTime.Parse(string1)

this is all you have to do to get the desired result.

HAPPY PROGRAMMING

vasanth kani
 
Back
Top