×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

GENERATE AUTOMATIC DATE

GENERATE AUTOMATIC DATE

GENERATE AUTOMATIC DATE

(OP)
CAN SOMEONE HELP ME CREATE A DATE FIELD IN A WEB PAGE THAT AUTOMATICALLY UPDATES EVERY 2 WEEKS? FOR INSTANCE, WHEN THE WEB PAGE IS ACCESSED, IT WILL SHOW WHAT WAS THE ORIGINAL DATE OF 08/12/2016 (NOT NECESSARILY IN THIS FORMAT) TO BE 08/26/2016 BUT ON OR AFTER 08/26/2016, THE DATE CHANGES TO 09/09/2016. THIS CAN BE DONE IN VB OR JAVASCRIPT. ANY TIPS OR SUGGESTIONS ARE APPRECIATED.

RE: GENERATE AUTOMATIC DATE

VBScript will only run in Internet Explorer, so you might want to ask in forum216: Javascript. You might also want to sprinkle in a few lowercase characters in your next post, since uppercase tends to mean shouting, and is considered bad etiquette.

RE: GENERATE AUTOMATIC DATE

(OP)
ACTUALLY VB DOES WORK IN OTHER BROWSERS BESIDES INTERNET EXPLORER
APPRECIATE YOUR RESPONSE.

RE: GENERATE AUTOMATIC DATE

>ACTUALLY VB DOES WORK IN OTHER BROWSERS BESIDES INTERNET EXPLORER
Ok, I'm interested. Name one please. Because I'm aware of only one that supports vbscript natively, and that is IE.

RE: GENERATE AUTOMATIC DATE

>Ok, I'm interested

Me too. Of course we're thinking about client side. Maybe the OP is referring to server side ASP.



RE: GENERATE AUTOMATIC DATE

(OP)
vb works with chrome and firefox as well as i.e.

RE: GENERATE AUTOMATIC DATE

>vb works with chrome and firefox as well as i.e

So, your corporate websites are therefore ASP-based; it isn't your browser running the VBscript, it is the server. You might like to visit forum333: Microsoft: ASP (Active Server Pages) for info on this.

Here's the basic calculation that meets the requirements you outlined in your first post, assuming you know and can retrieve the original date (startdate) and the current date (currentdate):

CODE

    Dim change, displaydate
    change = DateDiff("ww", startdate, currentdate)
    displaydate = DateAdd("ww", 2 * (change \ 2) + 2, startdate)
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close