This topic is locked

Date a record was added, and Date modified PHP 6.2

3/8/2014 4:30:33 PM
PHPRunner General questions
W
williampipes author

I have several tables, that need to have 2 date fields, one that stores the date that the record was originally added, (read only) then another that displays the date modified. I am using PHP Runner 6.2 on 2005 MS SQL server, on godaddy. I know how to create the second field, (Date modified) I set default to now() and make read only, but how do I create a field, that originally sets the current date now() but preserves that date, and does NOT update???

S
Sergej 3/10/2014



I have several tables, that need to have 2 date fields, one that stores the date that the record was originally added, (read only) then another that displays the date modified. I am using PHP Runner 6.2 on 2005 MS SQL server, on godaddy. I know how to create the second field, (Date modified) I set default to now() and make read only, but how do I create a field, that originally sets the current date now() but preserves that date, and does NOT update???



well if you have two date fields Date1 and Date2

put the first field only on add page (readonly, now()) and the second field (also readonly, now()) only on edit page - that way date1 would be creation date date2 modified date...

would it help?