This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
dev:sql:functions:current_time [2010/07/28 22:15] els |
dev:sql:functions:current_time [2016/06/28 22:38] (current) |
||
|---|---|---|---|
| Line 19: | Line 19: | ||
| 16:15:08.00 | 16:15:08.00 | ||
| - | </code> | ||
| - | ==== Example 2: Expression calculating age ==== | ||
| - | |||
| - | <code> | ||
| - | > select birthdate, $compare_dates(birthdate, current_date, 'YY') age from individuals; | ||
| - | |||
| - | BIRTHDATE AGE | ||
| - | ------------ ----------- | ||
| - | 1938-07-14 72 | ||
| - | 1957-11-22 53 | ||
| - | 1960-07-28 50 | ||
| - | 1929-08-22 81 | ||
| - | 1933-07-09 77 | ||
| - | 1944-08-01 66 | ||
| - | 2004-09-14 6 | ||
| </code> | </code> | ||
| Line 42: | Line 27: | ||
| {{page>:bottom_add&nofooter&noeditbtn}} | {{page>:bottom_add&nofooter&noeditbtn}} | ||
| - | |||