944,090 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 3391
  • ASP RSS
Apr 27th, 2005
0

Small date problem

Expand Post »
Hi All,

I am getting a rabdom date from the db. Now for each date that I get I have to reduct 3.
For example:
I get 02/12/2005
The new date supposes to be: 30/11/2005

How can I do that?

Thanks,
Assaf
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
scialom is offline Offline
3 posts
since Apr 2005
Apr 27th, 2005
0

Re: Small date problem

Are you asking how you can subtract 3 months from a date? Pretty easy, use the vbscript dateadd function. I know it sounds backwards, but if you add a negative number you'll be subtracting in essence. In your case you would do it this way dateadd("m", -3, 02/12/2005)

Makes sense?
Reputation Points: 14
Solved Threads: 5
Junior Poster
nicentral is offline Offline
166 posts
since Apr 2005
Apr 27th, 2005
0

Re: Small date problem

I meant 3 days but it's the same :p
Thanks, it helps

Assaf
Reputation Points: 10
Solved Threads: 0
Newbie Poster
scialom is offline Offline
3 posts
since Apr 2005
May 15th, 2006
0

Re: Small date problem

If u r using VbScript simple gice CDate("urDate")-3
Reputation Points: 10
Solved Threads: 1
Newbie Poster
radharadha is offline Offline
6 posts
since May 2006
Jun 17th, 2006
0

Re: Small date problem

What does you query look like ??
Reputation Points: 10
Solved Threads: 0
Newbie Poster
oscarsierra is offline Offline
4 posts
since Jun 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: can i use mysql database with asp
Next Thread in ASP Forum Timeline: asp problem ADODB.Recordset error '800a0bb9'





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC