www.webdeveloper.com
Results 1 to 2 of 2

Thread: current date - 5 years

  1. #1
    Join Date
    Feb 2008
    Posts
    1

    current date - 5 years

    Could someone please help me with the code to retrieve the current date minus 5 years. Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    here
    Posts
    4,551
    PHP Code:
    var myDate = new Date();
    myDate.setFullYear(myDate.getFullYear() - 5); 
    If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
    The same applies to HTML and the forums [HTML][/HTML] tags.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles