Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2008
    Posts
    11

    Question Unanswered: How to check/update yes/no fields and set date

    Can some1 help me with this? How do i check/update yes/no fields of a DB. Also how can i set the current date plus 2 weeks in a date/time field with the format being general date (6/30/08). And to save some time how can i check today's date against it?

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    It would help if we knew what database you were asking about. Generally speaking, "yes/no" fields are represented by a bit that is either on or off (1 or 0). The date part of your question depends entirely on the type of database you use.
    oh yeah... documentation... I have heard of that.

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

  3. #3
    Join Date
    Jun 2008
    Posts
    11

    i

    i figured out the yes/no fields by just setting it to true. it is a MS access DB. doubt it makes a difference but it's suffix is .mdb instead of the newer one. i think i found out how to add to the date from http://www.w3schools.com/Vbscript/func_dateadd.asp. but i'm wondering how i can post the current date in the DB.

  4. #4
    Join Date
    Jun 2008
    Posts
    11
    I've found a code snippet to view the date.
    Response.Write ("The time on the server is: " & Date())

    how can i change this to take the return from Date() to a variable and then print line.

    though this i wrong its what i mean...
    date = Date()
    Response.Write(date)

  5. #5
    Join Date
    Jun 2008
    Posts
    11
    i found it out but if anyone can help me with this one id appreciate it.

    here is some of the code...

    Dim dtmMyDate
    Dim dtmMyDate2

    dtmMyDate = Date()
    dtmMyDate2 = (DateAdd("d",14,dtmMyDate))

    rsProjDatabase2.Fields("LoginDate") = dtmMyDate2

    but i'm getting this error...

    Error Type:
    ADODB.Recordset (0x800A0CC1)
    Item cannot be found in the collection corresponding to the requested name or ordinal.
    /checkexist.asp, line 71

  6. #6
    Join Date
    Jun 2008
    Posts
    11
    Sorry for any inconvenience but I found my problem. Forgot to add tbl.LoginDate in SQL statment

Posting Permissions

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