Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 23rd, 2006, 09:17 AM
Registered User
Points: 1,897, Level: 17
Points: 1,897, Level: 17 Points: 1,897, Level: 17 Points: 1,897, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Mumbai, Maharastra, India.
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default How to get previous date?

How to get previous date from var dt = new Date()?

Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.
  #2 (permalink)  
Old June 26th, 2006, 10:57 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hi Rupen!!
var dt=new Date()
dt.setDate(dt.getDate()-1) //previous date
//dt.setDate(dt.getDate()+1) //next date

alert(dt)

Hope this will help you

Cheers :)

vinod


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get Previous Date in vb.net kostaskir VB How-To 1 August 31st, 2007 09:21 AM
Needs to get previous date from the given date balakrishna Java Basics 1 April 23rd, 2007 05:25 AM
selecting date and previous dates harpua MySQL 0 April 5th, 2007 08:25 PM
Next and Previous buttons. g_vamsi_krish ASP.NET 1.x and 2.0 Application Design 1 January 19th, 2006 11:19 AM
Previous Control Name wscheiman Access VBA 3 November 8th, 2004 02:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.