Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.databases.mysql,comp.lang.php Subject: Re: Storing dates Date: Mon, 23 Jun 2014 08:12:51 +0200 Lines: 20 Message-ID: <53A7C563.6050901@arnowelzel.de> References: <1v5cqtux7fm2t$.14sqgdhtzf3vw.dlg@40tude.net> <6164852.CzF7jrs0IF@PointedEars.de> <1mddkhwt2mr0v$.1m6eithcu7iod.dlg@40tude.net> <53A67D5D.5040408@arnowelzel.de> <1ma2vbq2a068v.1761m84okoiz6.dlg@40tude.net> <53A73509.4090605@arnowelzel.de> <799zxuonxakb$.10x90vriz3wvb$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net YiNWR154qjpLPzmEEVtb5gr+uAEH19Be6rQNkCyVHZu6t6Ys+E Cancel-Lock: sha1:8ZCevR5znFXUOsP1oyMET8g0rxA= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <799zxuonxakb$.10x90vriz3wvb$.dlg@40tude.net> X-Enigmail-Version: 1.6 Xref: csiph.com comp.databases.mysql:5425 comp.lang.php:14007 richard, 2014-06-23 05:04: [...] > BTW, date() itself is not anything but a function. > date(z) takes the current date of the server and trasnform it into a number > in the range of 1 to 366. > > If the date were 2014-01-01, date(z) would return 1. > Dayofyear() takes that number and transform it back to the calendar date. Yep - but only for the current year. Next year 1 would meen 2015-01-01 and so on. -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de http://fahrradzukunft.de