Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to convert Date of v.b to DateTime of c#

How to convert Date of v.b to DateTime of c#

Scheduled Pinned Locked Moved C#
csharptutorial
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dj y
    wrote on last edited by
    #1

    I have a web service and i send parameters date the it's give me exception string is not in good format my code is in v.b. and web service language is c#

    OriginalGriffO J V 3 Replies Last reply
    0
    • D Dj y

      I have a web service and i send parameters date the it's give me exception string is not in good format my code is in v.b. and web service language is c#

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      At a guess, it's a string - or you wouldn't be converting it. Which implies the service computer and the application computer are using different locales, or cultures. Don't - pass it as a date value: always keep values in the most sensible datatype, rather than strings...

      You looking for sympathy? You'll find it in the dictionary, between sympathomimetic and sympatric (Page 1788, if it helps)

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      1 Reply Last reply
      0
      • D Dj y

        I have a web service and i send parameters date the it's give me exception string is not in good format my code is in v.b. and web service language is c#

        J Offline
        J Offline
        jschell
        wrote on last edited by
        #3

        Djay Hole wrote:

        web service language is c#

        No web service is web service. It might be implemented in C# but that doesn't change anything.

        Djay Hole wrote:

        exception string is not in good format my code

        The web service expects a web service call with the data in the format that it expects. And you are not sending it that way. Figure out the correct format and send it that way.

        1 Reply Last reply
        0
        • D Dj y

          I have a web service and i send parameters date the it's give me exception string is not in good format my code is in v.b. and web service language is c#

          V Offline
          V Offline
          V 0
          wrote on last edited by
          #4

          Look into the DateTime ToString[^] method and the DateTime TryParseExact[^] methods. Although you could just pass the Date or DateTime objects as is? Chances are it is compatible. But for the record, I'm assuming you're talking VB.Net?

          V.
          (MQOTD rules and previous solutions)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups