Results 1 to 5 of 5

Thread: date issue

  1. #1
    Join Date
    May 2004
    Posts
    86

    Unanswered: date issue

    I have a search form all works well. But if the date falls todays month i want a message box. Where would i place the code?
    my dates are setup 20041231

    SO if the date is 20041012 then i want a message box the feild is text333


    here is what i tried
    If Text133 < Current Month Then
    MsgBox "This Person IS termed!", vbOKOnly, "Invalid Search Criterion!"

    thanks

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    use a standard date format?

    Your other option is to constantly parse your dates whenever you need to us them, like here for instance. This is particularly nasty if you don't use 0's for place holders, eg: 2004121 - what day is that? Is that december 1st or january 21'st?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    May 2004
    Posts
    86

    ok here we go

    in our system we use date formates as 20041004 which is october 4 2004

    so i want to check against cureent month to see if members are expired.
    any way to check my date format against the current month to see if members are expired?

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Are you able to use the month() function with that format?

    If so, use month(yourdate) - month(expiration_date)

    Otherwise you could use mid() to parse out the month manually, something like mid(yourdate, 5, 2)
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    May 2004
    Posts
    86

    well

    So if this months is december i want an alert message that shows me the dates that are before this month. So all dates that are before december. My date format is 20041002 so this would so an alert message date expired.


    How would i use the month function to show any date thats before the current month



    Thanks

Posting Permissions

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