Changing string Format

  • Thread starter Thread starter deepak
  • Start date Start date
D

deepak

Hi All,

How to convert the 1st format of string to 2nd one in vb.net

1st(datetype string) : "2/12/2008 6:00:00 PM"
2nd(datatype string): "2008-2-12T17:00:00"

note: in 2nd string ,the T is just a alpahbet

Thanks,
Deepak
 
deepak said:
How to convert the 1st format of string to 2nd one in vb.net

1st(datetype string) : "2/12/2008 6:00:00 PM"
2nd(datatype string): "2008-2-12T17:00:00"

note: in 2nd string ,the T is just a alpahbet


'DateTime.ParseExact'/'DateTime.ToString'.
 
check blog bypsoft.blogspot.com It speaks about DateTime to string formatting (actually about miliseconds handling but you will find answer on your question). In general, convert 1st string to DateTime and then use ToString(<format>) on that DateTime variable with proper format.

DLM@bypsoft
Compare databases (SQL Server, MySQL, Oracle) for free.
 
Back
Top