Results 1 to 6 of 6

Thread: date change

  1. #1
    Join Date
    Oct 2002
    Posts
    33

    Unanswered: date change

    hi, i have a field DUEDATE. i want i will enter the duedate for the first time and every week it will change the date. like i entered the date 11/08/02 and on 11/15/02 it will change the data for the field DUEDATE 11/15/02

    ANY HELP PLEASE!

  2. #2
    Join Date
    Nov 2002
    Posts
    9
    Would this work?
    Today's date + 7 days
    =date() + 7

  3. #3
    Join Date
    Oct 2002
    Posts
    33
    hilary

    thanks for responding but it didnt help. it will always show 7 days advance of today's date

  4. #4
    Join Date
    Nov 2002
    Posts
    2
    I think you will need to do some conditional checking. whenever the form opens, you can do some sort of math with the dates to determine if the current date is off from 11/08/02 by an increment of weeks.

    a simple solution that pops to mind (but i'm sure you can be much more efficient)

    days = date() - 11/08/02
    if days mod 7 = 0
    'update duedate


    good luck

  5. #5
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    another option is
    Code:
    if DueDate+7 = Date() then  DueDate = date()
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  6. #6
    Join Date
    Oct 2002
    Posts
    48

    I think, you need something CRON kind of thing.

    I dont know, which backend you are using.

    If you are using SQL Server, In Procedure you may use logic, and make it run automatially.

    In Unix based system, there is cron program, over there, you can set
    execution of particular script at your desired frequency(dailiy, weekly, monthly, on particular date of month etc.).

    Something, this kind of thing, you have to find out for your database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •