Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Dates Help
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Dates Help

 Post Reply Post Reply
Author
group1 View Drop Down
Newbie
Newbie


Joined: 20 August 2003
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote group1 Quote  Post ReplyReply Direct Link To This Post Topic: Dates Help
    Posted: 10 September 2003 at 7:38pm

Through the use of a form i am getting users to enter a specific date (mm/dd/yyyy) and a number of days

I want to basically get this number of days and add it to the date to calculate the end date

eg. user enters 01/31/2003 and the number 4, and I want an asp page to calculate as an output: 02/03/2003

I am aware of a function in asp which for example: <% Date + 4 %>

But how do I put my own date into this method, and make the ASP code realise it is a date

 

Back to Top
Phat View Drop Down
Senior Member
Senior Member


Joined: 23 February 2003
Status: Offline
Points: 386
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phat Quote  Post ReplyReply Direct Link To This Post Posted: 10 September 2003 at 7:45pm

Use dateadd below is some info from a website.

Interval:

Description:
yyyy Year
q Quarter
m Month
y Day of year
d Day
w Weekday
ww Week of year
h Hour
n Minute
s Second

Before: Code: After:
17.02.01 DateAdd("yyyy","1",yourdate) 17.02.02
17.02.01 DateAdd("m","1",yourdate) 17.03.01
17.02.01 DateAdd("q","1",yourdate) 17.05.01
 
James
 


Edited by Phat
Back to Top
b_bonnett View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Location: New Zealand
Status: Offline
Points: 275
Post Options Post Options   Thanks (0) Thanks(0)   Quote b_bonnett Quote  Post ReplyReply Direct Link To This Post Posted: 10 September 2003 at 9:26pm

W3Schools has a good page on DateAdd: http://www.w3schools.com/vbscript/func_dateadd.asp

Blair

Webmaster, The Plane Gallery
Greetings From Christchurch
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.