Skip to main content
Participating Frequently
November 7, 2009
Question

NOW()

  • November 7, 2009
  • 3 replies
  • 506 views

I would like to insert a record using the insert record behavior and insert the date and time also into the database.   Is this possible?

This topic has been closed for replies.

3 replies

David_Powers
Inspiring
November 8, 2009

To get help in an online forum like this, use a more descriptive subject line and give more details of your setup. You'll find some helpful guidelines in How to get help quickly: http://forums.adobe.com/thread/470404.

If you want to insert the current date and time in a database, you might find that the database system has a suitable data type that does it automatically. For example, MySQL has a TIMESTAMP data type that does precisely that. See http://dev.mysql.com/doc/refman/5.0/en/timestamp.html.

DwFAQ
Participating Frequently
November 7, 2009

The answer to your question is yes; it is possible.

Participating Frequently
November 7, 2009

Read your DBMS documentation. Whichever you are using, there's a way to insert the current date/time by setting the columns default value without having to use server/client side scripting.