Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Base - populate a date field and a time field with "now"

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time differens in minutes, in relation to the first field, and the result to be stored in the second datetime field.

That sounds messy, here's and example:

First datetime field: 2014-06-07 23:00 Second field: 10 (this is a time differens in minutes) The result in second datetime field in the table from this should be: 2014-06-07 22:50

Does it make any sense?

Should i be considering another db backend instead of the standard one in base when dealing with different timestamps? Like "created at", "updated at" and so on?

Thanks! /Göstapopoulos

Base - populate a date field and a time field with "now"

In my form i want a date field and a time field to be populated with current date and time as default. How do i do that?

Then i have a second datetime field. In the form i want to have a text field (or a dropdown maybe) in which i type in a time differens in minutes, in relation to the first field, and the result to be stored in the second datetime field.

That sounds messy, here's and example:

First datetime field: 2014-06-07 23:00 Second 23:00
Text field: 10 10 (this is a time differens in minutes) The result minutes)
Result stored
in second datetime field in the table from this should be: db table: 2014-06-07 22:50

Does it make any sense?

Should i be considering another db backend instead of the standard one in base when dealing with different timestamps? Like "created at", "updated at" and so on?

Thanks! /Göstapopoulos