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-12T16: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?=

      #3
      RE: changing string format

      sorry the 2nd is

      2nd(datatype string): "2008-2-12T18:00:00"

      Kindly reply me asap.
      - Deepak



      "deepak" wrote:
      sorry the 2nd is
      >
      2nd(datatype string): "2008-2-12T16: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

      • lue

        #4
        Re: changing string format

        Here if VB.NET code

        Dim dt As DateTime

        Dim strDt

        dt = Format(#2/12/2008 3:23:00 PM#, "dddd, d MMM yyyy h:m:ss tt ")

        strDt = Format(dt, "yyyy-MM-d%T h:m:ss tt")



        Lue





        "deepak" <deepak@discuss ions.microsoft. comwrote in message
        news:5208EC5E-0BFD-4EA7-9B22-D246BD230CE7@mi crosoft.com...
        sorry the 2nd is
        >
        2nd(datatype string): "2008-2-12T18:00:00"
        >
        Kindly reply me asap.
        - Deepak
        >
        >
        >
        "deepak" wrote:
        >
        >sorry the 2nd is
        >>
        >2nd(datatype string): "2008-2-12T16: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?=

          #5
          Re: changing string format

          Hi Lue,

          its giving me finally "2008-02-12T 6:0:00 PM" but i need it as "2008-02-12T
          18:00:00"

          -Deepak


          "lue" wrote:
          Here if VB.NET code
          >
          Dim dt As DateTime
          >
          Dim strDt
          >
          dt = Format(#2/12/2008 3:23:00 PM#, "dddd, d MMM yyyy h:m:ss tt ")
          >
          strDt = Format(dt, "yyyy-MM-d%T h:m:ss tt")
          >
          >
          >
          Lue
          >
          >
          >
          >
          >
          "deepak" <deepak@discuss ions.microsoft. comwrote in message
          news:5208EC5E-0BFD-4EA7-9B22-D246BD230CE7@mi crosoft.com...
          sorry the 2nd is

          2nd(datatype string): "2008-2-12T18:00:00"

          Kindly reply me asap.
          - Deepak



          "deepak" wrote:
          sorry the 2nd is
          >
          2nd(datatype string): "2008-2-12T16: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

          • lue

            #6
            Re: changing string format

            Yes just format the 2nd one as following
            Dim dt As DateTime

            Dim strDt

            dt = Format(#2/12/2008 6:00:00 PM#, "dddd, d MMM yyyy hh:m:ss tt ")

            strDt = Format(dt, "yyyy-MM-d%T HH:m:ss")


            Lue

            "deepak" <deepak@discuss ions.microsoft. comwrote in message
            news:2E24ECBE-17EE-4A7A-9F9A-FC2E28BBAE68@mi crosoft.com...
            Hi Lue,
            >
            its giving me finally "2008-02-12T 6:0:00 PM" but i need it as
            "2008-02-12T
            18:00:00"
            >
            -Deepak
            >
            >
            "lue" wrote:
            >
            >Here if VB.NET code
            >>
            >Dim dt As DateTime
            >>
            >Dim strDt
            >>
            >dt = Format(#2/12/2008 3:23:00 PM#, "dddd, d MMM yyyy h:m:ss tt ")
            >>
            >strDt = Format(dt, "yyyy-MM-d%T h:m:ss tt")
            >>
            >>
            >>
            >Lue
            >>
            >>
            >>
            >>
            >>
            >"deepak" <deepak@discuss ions.microsoft. comwrote in message
            >news:5208EC5 E-0BFD-4EA7-9B22-D246BD230CE7@mi crosoft.com...
            sorry the 2nd is
            >
            2nd(datatype string): "2008-2-12T18:00:00"
            >
            Kindly reply me asap.
            - Deepak
            >
            >
            >
            "deepak" wrote:
            >
            >sorry the 2nd is
            >>
            >2nd(datatype string): "2008-2-12T16: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?=

              #7
              Re: changing string format

              yeah lue,its woroking...ur great lue....thanks.. ....Ma i add u in msn ..also
              i may have some more questions in the coming hours....Kinldy help me...u
              dont know u helped so much in this way .. i can not forget really....:-)

              - Deepak


              "lue" wrote:
              Yes just format the 2nd one as following
              Dim dt As DateTime
              >
              Dim strDt
              >
              dt = Format(#2/12/2008 6:00:00 PM#, "dddd, d MMM yyyy hh:m:ss tt ")
              >
              strDt = Format(dt, "yyyy-MM-d%T HH:m:ss")
              >
              >
              Lue
              >
              "deepak" <deepak@discuss ions.microsoft. comwrote in message
              news:2E24ECBE-17EE-4A7A-9F9A-FC2E28BBAE68@mi crosoft.com...
              Hi Lue,

              its giving me finally "2008-02-12T 6:0:00 PM" but i need it as
              "2008-02-12T
              18:00:00"

              -Deepak


              "lue" wrote:
              Here if VB.NET code
              >
              Dim dt As DateTime
              >
              Dim strDt
              >
              dt = Format(#2/12/2008 3:23:00 PM#, "dddd, d MMM yyyy h:m:ss tt ")
              >
              strDt = Format(dt, "yyyy-MM-d%T h:m:ss tt")
              >
              >
              >
              Lue
              >
              >
              >
              >
              >
              "deepak" <deepak@discuss ions.microsoft. comwrote in message
              news:5208EC5E-0BFD-4EA7-9B22-D246BD230CE7@mi crosoft.com...
              sorry the 2nd is

              2nd(datatype string): "2008-2-12T18:00:00"

              Kindly reply me asap.
              - Deepak



              "deepak" wrote:

              sorry the 2nd is
              >
              2nd(datatype string): "2008-2-12T16: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...