CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Future Date

  1. #1
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Future Date

    Hello, I want to call a certain function, after 6 months, or 12 months, or 18 months; how can I do this

    F. T. W.

  2. #2
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868

    Re: Future Date


    option Explicit

    private Sub Form_Load()
    Dim dToday as date
    Dim dLastDay as date
    Dim lDiff as Long

    dToday = Now()
    dLastDay = GetSetting(App.Title, "Settings", "SaveDate", Now())
    lDiff = DateDiff("M", dLastDay, dToday)

    If lDiff >= 6 then
    'Do your function here
    'Save new date in Reg.
    SaveSetting App.Title, "Settings", "SaveDate", Now()
    End If

    End Sub





  3. #3
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Future Date

    I've got this form connected to a DB through ADO code. The problem is that I want to change and update the recordset, for each record in 6 Months time, how can I save the date for each record to the registry, orwhat else can I do¿

    F. T. W.

  4. #4
    Join Date
    Sep 2001
    Posts
    16

    Re: Future Date

    Hi,
    It is better to create a table for the date. and verify it whether u have completed 6 months or not.If so then u call ur function and update the date in the data base.
    Have a nice time
    sunil.


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured