1 Reply Latest reply on Mar 22, 2009 9:31 AM by Günter Schenk

    Add date stamp to insert record

    Level 1
      This should be easy. I would think it's a standard procedure but 5 hours of searching the net, the forums, and experimenting has left me with a loss.

      I've created a simple form with 3 fields, firstName, lastName, eMail

      I've created a SQL database and table with the fields id, date, firstName, LastName, eMail

      The id is an int and the primary key, date is set to datetime the rest are varchar

      I've created a successful Insert Record behavior and now all I want to do is to update the date field with the datetime value when the record is added.

      Things I've tried include a java script to create a date variable, SQL NOW in various forms, a ton of other complex solutions. I've added hidden fields to the form, which got me the closest when I manually entered a value in the same format that I see in the SQL table when I add a row to the table from the PHP admin page.

      Please tell me this is not going to require 30 lines of code and another half day of fussing around.
        • 1. Re: Add date stamp to insert record
          Günter Schenk Level 4
          Hi Rick,

          ------
          Please tell me this is not going to require 30 lines of code and another half day of fussing around.
          ------

          with ADDT it´s pretty easy: just make sure that your datetime column gets ADDT´s "datetime" placeholder {NOW_DT} inserted as "entered value":

          Open the Insert Record Transaction dialog box, select the date column and define these settings:

          - Submit as: Date
          - Get value from: Entered Value
          - Value: {NOW_DT}

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver