sql - Adding a column in database of time type which automatically subtract inserted value from current time -


basically want time subtraction @ database end. mean whatever value insert in time field application should automatically subtracted current time , result should inserted in field.

you add or subtract datetime values each other. dates can in order , ouput positve/negative

datetime (2003-9-30 12:30) year minute - datetime (2003-8-1 11) year hour

result: interval (60 01:30) day minute


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -