freak Posted September 26, 2004 Report Share Posted September 26, 2004 (edited) JA dati glabajas DATE formaataa YYYY-MM-DD ka lai MySQL nosaka vecumu? Atnemot no musdienu datuma - dzimsanas datumu rezultata jaiegust gadi. Edited September 26, 2004 by freak Link to comment Share on other sites More sharing options...
bubu Posted September 27, 2004 Report Share Posted September 27, 2004 SELECT YEAR(datums-NOW()) FROM ... neder? Link to comment Share on other sites More sharing options...
Venom Posted September 27, 2004 Report Share Posted September 27, 2004 piemērs no MySQL manuāļa: SELECT name, FLOOR((TO_DAYS(NOW())-TO_DAYS(birth))/365) FROM pet; sk.arī DATE_SUB() Link to comment Share on other sites More sharing options...
Recommended Posts