Saving current date and time in ASP and ACCESS

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Saving current date and time in ASP and ACCESS

    Hi all,

    Im developing a simple web page and Im new to ASP.

    I want to save the current date and time in my MS ACCESS table

    I have a field in MS ACCESS and the data type is Date/Time is this correct or
    do I have to have it in Text???

    what should be the code here???

    adoRecordset.Fields("date") = Request.Form(Now)


    Is this correct??? But Im getting an error which says its expecting a string
    .....


    thanks for any help.









    Amcasperforu Guest

  2. Similar Questions and Discussions

    1. Get current date/time? Use them in hidden field?
      I've got an app that works as a reception log for clients coming in our agency. The receptionist logs each client's name into our log database. ...
    2. adding current date into Access using DW form
      I've looked all over this forum finding similar solutions but not exactly what I'm looking for. Relatively simple. My Access 2002 database has a...
    3. #13984 [Com]: date(I) does not correctly identify daylight saving time
      ID: 13984 Comment by: patt_jam at hotmail dot com Reported By: bmplummer1 at home dot com Status: Bogus Bug...
    4. #25981 [Opn->Bgs]: strtotime() returns incorrect date (near daylight saving time change)
      ID: 25981 Updated by: sniper@php.net Reported By: hazen at edsbits dot com -Status: Open +Status: ...
    5. Current Date & Time
      I want to display the current date & time on my web site. Not being a code guru could someone please tell me what is the simplest script that works...
  3. #2

    Default Re: Saving current date and time in ASP and ACCESS

    Try

    adoRecordset.Fields("date") = Now

    --
    Jules
    [url]http://www.charon.co.uk/charoncart[/url]
    Charon Cart 3
    Shopping Cart Extension for Dreamweaver MX/MX 2004



    Julian Roberts Guest

  4. #3

    Default Re: Saving current date and time in ASP and ACCESS

    Actually the easiest way is in access to make the default value for that
    column Now();

    Whenever a new record is inserted then the current date and time will
    automatically be entered as well.




    "Amcasperforu" <webforumsuser@macromedia.com> wrote in message
    news:d43aic$e4k$1@forums.macromedia.com...
    > Hi all,
    >
    > Im developing a simple web page and Im new to ASP.
    >
    > I want to save the current date and time in my MS ACCESS table
    >
    > I have a field in MS ACCESS and the data type is Date/Time is this correct
    > or
    > do I have to have it in Text???
    >
    > what should be the code here???
    >
    > adoRecordset.Fields("date") = Request.Form(Now)
    >
    >
    > Is this correct??? But Im getting an error which says its expecting a
    > string
    > ....
    >
    >
    > thanks for any help.
    >
    >
    >
    >
    >
    >
    >
    >
    >

    Anthony Brown Guest

  5. #4

    Default Re: Saving current date and time in ASP and ACCESS

    Not to second guess you Julian, but wouldn't it be,

    adoRecordset.Fields("date")=Now()

    Drew

    "Julian Roberts" <newsg@charon.co.uk> wrote in message
    news:d43bjl$fmm$1@forums.macromedia.com...
    > Try
    >
    > adoRecordset.Fields("date") = Now
    >
    > --
    > Jules
    > [url]http://www.charon.co.uk/charoncart[/url]
    > Charon Cart 3
    > Shopping Cart Extension for Dreamweaver MX/MX 2004
    >
    >
    >

    Drew Guest

  6. #5

    Default Re: Saving current date and time in ASP and ACCESS

    Either can be used. VB Script isn't very fussy :)

    --
    Jules
    [url]http://www.charon.co.uk/charoncart[/url]
    Charon Cart 3
    Shopping Cart Extension for Dreamweaver MX/MX 2004


    Julian Roberts Guest

  7. #6

    Default Re: Saving current date and time in ASP and ACCESS

    Thanks guys

    Another one,

    Any suggestion from these : ?

    I'm planning to use the check box for a particular question, since checkbox is
    zero to n choices, what do you suggest to be the best should be done, do I need
    to create separate fields for each of the check boxes choices???

    Or just a single field with a Text data type and just combine the choices
    delimited with a comma (or any character) ???
    If that would be the case, how should I do it to combine all the chosen
    choices?

    Thanks again for the immediate response.






    Amcasperforu 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