SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to make strings with - between nos

    hi,

    i have three vars, year,month and date.

    i want it in format year-month-date.

    ie, for ex, 2007-6-6.

    i tried it this way but it subtracted and give the value as 1995.

    Code:
    var str=year+'-'+month+'-'+date;
    how to do it. Thanks.

  2. #2
    SitePoint Enthusiast cheap freelancer's Avatar
    Join Date
    Jun 2007
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use somthing like this
    '2007'+'-'

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    year , month, date are vars


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •