Results 1 to 3 of 3

Thread: comparing date data types

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    7
    This is a puzzler to me at the moment. How can I compare a field, which is a date, to the system date? I'm getting a data type mismatch error. If its a string to string comparison you just enclose the variable like so:
    '" & variable & "'. I don't know how it is done with date data types. What does the quotes and '&' mean?

  2. #2

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    7
    I got it already.
    datefield = #" & variable & "# is how it should be.

  3. #3
    Guest
    You can also use each of those functions to emulate
    other types. And for comparing a date field or a string
    you can use CDate function.

    Code:
    CBool(expression)  - Boolean
    CByte(expression)  - Bytes
    CCur(expression)   - Currency
    CDate(expression)  - Date
    CDbl(expression)   - Double
    CDec(expression)   - Decimaal
    CInt(expression)   - Integer
    CLng(expression)   - Long
    CSng(expression)   - Single
    CStr(expression)   - String
    CVar(expression)   - Variant
    -Kayoca Mortation

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