changing string format

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?ZGVlcGFr?=

    changing string format

    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
  • =?Utf-8?B?ZGVlcGFr?=

    #2
    RE: changing string format

    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

    Comment

    • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

      #3
      RE: changing string format

      Convert the first to a Date Time:

      DateTime dtg;
      DateTime.TryPar se ("2/12/2008 6:00:00 PM", out dtg);

      Then convert the dtg to the output format:

      string dtgOutput;
      dtgOutput = dtg.ToString("y yyy'-'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

      Comment

      • =?Utf-8?B?ZGVlcGFr?=

        #4
        RE: changing string format

        yeah its workign now..thanks . u r a man :-)

        -Deepak

        "Family Tree Mike" wrote:
        Convert the first to a Date Time:
        >
        DateTime dtg;
        DateTime.TryPar se ("2/12/2008 6:00:00 PM", out dtg);
        >
        Then convert the dtg to the output format:
        >
        string dtgOutput;
        dtgOutput = dtg.ToString("y yyy'-'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

        Comment

        Working...