Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » setting default values for created_date and updated_date (RADICORE doesn't seem to like it when you do this...)
setting default values for created_date and updated_date [message #4972] Wed, 02 September 2015 01:24 Go to next message
rafs is currently offline  rafs
Messages: 69
Registered: May 2015
Member
I set default values for my created_date and updated_date values in PGSQL: DEFAULT 'now'::text::timestamp without time zone
RADICORE imported the word 'now' in the field upon 'import columns' action.
This causes an error warning when you try to create a new record in that table.
I just removed an default.
Just posting in case somebody runs into an error like this.
Re: setting default values for created_date and updated_date [message #4983 is a reply to message #4972] Wed, 02 September 2015 11:30 Go to previous message
AJM is currently offline  AJM
Messages: 2246
Registered: April 2006
Location: Surrey, UK
Senior Member
Firstly, the correct value for that default would be "now()" as any word followed by "(...)" is treated as a function. 'now' in quotes is treated as a string and is totally invalid for a field which is supposed to hold a timestamp.

Secondly, you should remove "now()" from the default value in the Data Dictionary and set the "Auto Insert" property instead.


Previous Topic: Setting PK field to NOEDIT, but not NOSEARCH
Next Topic: Cancel a Generate PHP screen
Goto Forum:
  


Current Time: Sun Jun 13 10:24:39 EDT 2021

Total time taken to generate the page: 0.01791 seconds