Small date problem

Please support our ASP advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Apr 2005
Posts: 3
Reputation: scialom is an unknown quantity at this point 
Solved Threads: 0
scialom scialom is offline Offline
Newbie Poster

Small date problem

 
0
  #1
Apr 27th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 158
Reputation: nicentral is an unknown quantity at this point 
Solved Threads: 4
nicentral's Avatar
nicentral nicentral is offline Offline
Junior Poster

Re: Small date problem

 
0
  #2
Apr 27th, 2005
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?
Nobody believes the official spokesman, but everybody trusts an unidentified source.

-- Please do not PM me with questions about a thread. If you respond to a thread, then everyone can benefit.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 3
Reputation: scialom is an unknown quantity at this point 
Solved Threads: 0
scialom scialom is offline Offline
Newbie Poster

Re: Small date problem

 
0
  #3
Apr 27th, 2005
I meant 3 days but it's the same :p
Thanks, it helps

Assaf
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 6
Reputation: radharadha is an unknown quantity at this point 
Solved Threads: 1
radharadha radharadha is offline Offline
Newbie Poster

Re: Small date problem

 
0
  #4
May 15th, 2006
If u r using VbScript simple gice CDate("urDate")-3
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 4
Reputation: oscarsierra is an unknown quantity at this point 
Solved Threads: 0
oscarsierra's Avatar
oscarsierra oscarsierra is offline Offline
Newbie Poster

Re: Small date problem

 
0
  #5
Jun 17th, 2006
What does you query look like ??
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC