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. ASP.NET
  4. split function in java script

split function in java script

Scheduled Pinned Locked Moved ASP.NET
javadata-structurestoolsquestion
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.
  • D Offline
    D Offline
    deepalititi
    wrote on last edited by
    #1

    i want to split date with separators with ' ' or '/' or '-'. i am trying to split the string with all this separators like var temp1 = new Array(); temp1 = datevalue1.split('/','-',' '); but it will not split datevalue1 string with all this separtors. but if i give only one paramert in split() function then it will work. so please provide some guidance that is it possible to split string with multiple parameters?

    V 1 Reply Last reply
    0
    • D deepalititi

      i want to split date with separators with ' ' or '/' or '-'. i am trying to split the string with all this separators like var temp1 = new Array(); temp1 = datevalue1.split('/','-',' '); but it will not split datevalue1 string with all this separtors. but if i give only one paramert in split() function then it will work. so please provide some guidance that is it possible to split string with multiple parameters?

      V Offline
      V Offline
      Venkatesh Mookkan
      wrote on last edited by
      #2

      deepalititi wrote:

      temp1 = datevalue1.split('/','-',' ');

      split method has only one parameter as input. So you can't pass more than one parameters to the split method. All you have to do is to do the split one by one. :cool:

      Regards, Venkatesh Mookkan. Software Engineer, India My: Website | Yahoo Group | Blog Spot

      D 1 Reply Last reply
      0
      • V Venkatesh Mookkan

        deepalititi wrote:

        temp1 = datevalue1.split('/','-',' ');

        split method has only one parameter as input. So you can't pass more than one parameters to the split method. All you have to do is to do the split one by one. :cool:

        Regards, Venkatesh Mookkan. Software Engineer, India My: Website | Yahoo Group | Blog Spot

        D Offline
        D Offline
        deepalititi
        wrote on last edited by
        #3

        thank you for your guidance:)

        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