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. Web Development
  3. VBScript Variant Question

VBScript Variant Question

Scheduled Pinned Locked Moved Web Development
question
3 Posts 2 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.
  • C Offline
    C Offline
    ChrisAdams
    wrote on last edited by
    #1

    A puzzle came up today which I can't really explain why, and was hoping someone would have a better idea than me. In VBScript if you create a string which represents a date and then call vartype on that variable, it returns as a subtype of date. I think it should be a string, and wondered why it would return as a date. dim mydate : mydate = "2005-01-01 12:20:05" response.write vartype( mydate )

    G 1 Reply Last reply
    0
    • C ChrisAdams

      A puzzle came up today which I can't really explain why, and was hoping someone would have a better idea than me. In VBScript if you create a string which represents a date and then call vartype on that variable, it returns as a subtype of date. I think it should be a string, and wondered why it would return as a date. dim mydate : mydate = "2005-01-01 12:20:05" response.write vartype( mydate )

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      No, it returns 8, which is the value for the subtype string. --- b { font-weight: normal; }

      C 1 Reply Last reply
      0
      • G Guffa

        No, it returns 8, which is the value for the subtype string. --- b { font-weight: normal; }

        C Offline
        C Offline
        ChrisAdams
        wrote on last edited by
        #3

        That will teach me to actually test things out. Thanks anyway, I was sure it was going to be a string.

        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