This is a discussion on "Date Difference" within the Classic ASP section. This forum, and the thread "Date Difference are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Date Difference
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Date Difference
Thanks a million for all the help so far !
What I'm trying to accomplish here is to show a link if the Todays date is equal to or not more that 10 days for the date the record was added. I have tried tons of combinations of +10, -10 etc and get a script error. <% If FormatDateTime(Date(), VbLongDate) =< FormatDateTime(DateAdded, VbLongDate) Then response.write("Page Background") Else response.write "Page Background" End if %> Thanks for all assistance Ernest L. Kendricks |
|
|
|
||||
|
so... you want only to pick out those dates that are either today... or ten days from now?
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
|||
|
The link "Page Background" is available to user to select a page background for their posting. When each record is added, the table field "DateAdded" is updated. What I'm wanting to do is give the user 10 days from the date they add the original record to either choose, update or change the page background. On day 11, the link would become inactive, preventing any further updates.
Thanks ELK |
|
|||
|
Try Using the Function DateDiff. It can tell you the time difference between 2 dates by either Days,Hours,Minues,seconds, etc.
Try something like.
Full Documentation at: http://www.devguru.com/Technologies/.../datediff.html Dont forget to check out VBScript Complete Reference at http://www.devguru.com/Technologies/...ript_list.html A LiNK you ShoULD always have on hand. (Also check out WSH Reference Section, Start Coding some of those Nasty email wormz :razz |
|
||||
|
I was gonna paste the MSDN description but the above is cool.
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
![]() |
| Tags |
| date, difference |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| font difference IE7 and the others | stupid dog | Web Page Design | 1 | Aug 24th, 2007 20:53 |
| whats the difference | acrikey | Other Programming Languages | 1 | Apr 5th, 2007 10:37 |
| The difference | moshe | Webforumz Cafe | 4 | Jan 28th, 2007 19:52 |
| Php . asp, asp net difference | maksinx | PHP Forum | 3 | Aug 15th, 2006 10:39 |
| Changing date format in date picker | AdRock | JavaScript Forum | 1 | Aug 1st, 2006 17:16 |