Priming DateTime

I have a field called LastUpdate (DATETIME type). The DATABASE VALUE is set to DateTime for INSERT and UPDATE but when I try to save the form I gett error complaining thet the field is empty.
Should I change a column type to TIMESTAMP or there is another reason ?
Any ideas ?

Arthur

Is your database MySQL?

If so, then simply use a TIMESTAMP column with “DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP” and let the database do all the work.

Check out timestamps in MySQL

Dave

Yes it is MySQL. The tables will be synchronized with SQLite based on DATEDTIME field. SQLite does not support TIMESTAMP so unless you offer another solution I might need to stick to this TYPE or eventually use DATE and TIME separately (which creates more work and room for errors).

There is no hand code in this App
Arthur

DATETIME_Error.jpg

OK, I recreated this same App from scratch and now the DATETIME is working fine so I really don’t know why it did not work in first place. everything in the App remains the same. I noticed though that similar problems have happened to me in the past with other Apps. Generated the App from wizard - not working. Re-generated the same App from wizard few days later and it works fine. I wonder if there is some browser issues that might cause this wired behavior, although every time I get to problems I clean Cache and Cookies and restart the browser.

Arthur

DATETIME() - resolved

OK, finally I discovered the problem. In the field setting this field was marked as required. In some sense it is required but it has to be set as NOT REQUIRED. the reason for that is that DATETIME is assigned upon record saved in database. The moment the ADD(or SAVE) button is clicked this field is still empty (resulting form popping out an Error). I set this field as: Hidden, NotRequired and assigned SystemDateTime from the database on Insert and on Update. It seems to work now.

Arthur