Entering date into Access

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Entering date into Access

    I'm sure this is basic level stuff but I've been away for a year so please bear
    with me.

    Basically I want a date entered into a form inserted into Access. I have tried
    the following

    Format inputed inthe form: '25/05/2005'

    Line in update query:
    setupdate = '#CreateODBCDate(form.setupdate)#',

    Cheers

    Neil

    neilorourker Guest

  2. Similar Questions and Discussions

    1. CFC & Null Date & Access
      hi all, i'm stumped on the following problem, and below is some simple example code of the problem. i would like to know how to UPDATE the...
    2. entering data into MS Access database
      Hello, I'm creating an online survey using XHTML -- no PHP -- where the data will be entering into a MS Access database, and I am having trouble...
    3. MS Access + date query
      Hi I have got access table with two date/time field namely field1 and field2. I made one html form that inputs two dates (it's not mandatory...
    4. Problem of Date with MS Access
      I am trying to display the records which the date (the Name field is Period) are greater than today's date from MS Access. It works fine except that...
    5. ASP - Access - Date() problem...
      In Access, the Format property* effects only the manner in which the date is displayed, not how it is stored. Jet stores dates a a Double number,...
  3. #2

    Default Re: Entering date into Access

    basically, the way I work with dates is using three select boxes (for year,
    month and day).
    and then, to insert the data into the DB I use the following:

    date = #CreateODBCDate(CreateDate(FORM.year, FORM.month, FORM.day))#

    Where FORM.year, FORM.month and FORM.day are the names of the select boxes.
    The problem with your example is, that you can't know how the user inputed the
    data into the field.

    SilverStrike Guest

  4. #3

    Default Re: Entering date into Access

    Also, you do not need to use single quotes around the CreateODBCDate() function.

    HTH
    mxstu Guest

  5. #4

    Default Re: Entering date into Access

    cheers

    I tried that recieved the following error when running the update query:

    [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in
    query expression ''{d '2005-05-25'}''.


    SQL = "UPDATE tbl_artists SET setupdate = '{d '2005-05-25'}' WHERE
    tbl_artists.artistid=118"

    the form variables were set as follows:
    <cfset setupdate= #CreateODBCDate(CreateDate(FORM.setupyear, FORM.setupmonth,
    FORM.setupday))#>




    neilorourker Guest

  6. #5

    Default Re: Entering date into Access

    Please include in the insert query.
    It seems you use single quotes. it seems this is the problam.
    SilverStrike Guest

  7. #6

    Default Re: Entering date into Access

    cheers

    That's sorted the problem
    neilorourker Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139