Results 1 to 2 of 2

Thread: DateSerial

  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Question Unanswered: DateSerial

    I have a form that tracks when employees need to renew their licenses, they generally know when to renew when the finaldate document is done. The date could be 03/18/00 so that means that the renewal date should be 03/31/02, so the renwal date will be every 2 years at the end of the month. I need the database to track that for me, I cant have repeating values in my tables so I have it set up as
    TM_Id
    First_name
    Last_name
    ss_number
    Finalsuit_date

    what I have so far in a query is First_renewal: =DateSerial(Year([FinalSuit_date])+2,Month([Finalsuit_date]),Day([Finalsuit_date])) and the I have Secon_date, third...etc with the same code
    this code calculates the dates so that its at the end of the month every two years. But if theres no date in the final suit date then you get an #error# so I am wondering if this is the best way of doing this???

    Can someone help me please

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,422
    Provided Answers: 7

    tracking

    What i Did

    Is for each license (Work Skill)

    had two Extra Feilds

    [1st] the Time Line interval
    yyyy Year
    q Quarter
    m Month
    d Day

    [2nd] is the
    Number

    so for each license (Work Skill) would be a
    time line
    [1st] = yyyy [2nd] = 2


    Know all i needed know is the Last time the license (Work Skill) was set

    from that date I can do a

    nexttime = Dateadd([1st],[2nd],[datelastdone])

    then if nexttime was within the month the Bells would Ring

    I had even put warning time in the license (Work Skill) table



    once person done license (Work Skill) i would update [datelastdone]
    with todays date also write it to the history table

    doing it this way

    I can have differance license (Work Skill) time Line

    [1st] = m [2nd] = 6

    [1st] = m [2nd] = 24

    hope this helps


    look in help under datediff or dateadd
    Last edited by myle; 04-29-04 at 19:02. Reason: spelling
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

Posting Permissions

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