This topic is locked

Required "Date" with 2200 hours

9/12/2011 2:53:57 PM
PHPRunner General questions
W
wrjost author

Hi, everybody,

I have a tournament registration database with a required date field called "registration_starts". "Edit as" is "Date", "View as" is "Datetime".
It works fine, but the datetime field which is saved into the MySQL database is viewed as "YYYY-MM-DD 00:00:00" - so people using the database have to stay up until midnight in order to be among the first to register for a tournament.
How can I change this so that a tournament organizer picks a date and the field is automatically saved as "YYYY-MM-DD 22:00:00"?
Any ideas?
Thanks & greetings,

Wilfried

Sergey Kornilov admin 9/12/2011

Try to use something like this as a default value for this field:

date("Y-m-d")."22:00:00"