Convert the first to a Date Time:
DateTime dtg;
DateTime.TryParse ("2/12/2008 6:00:00 PM", out dtg);
Then convert the dtg to the output format:
string dtgOutput;
dtgOutput = dtg.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss");
"deepak" wrote:
> sorry the 2nd is
>
> 2nd(datatype string): "2008-2-12T18:00:00"
>
> Kindly reply me asap.
> - Deepak
>
>
>
> "deepak" wrote:
>
> > 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
|