[PHP] Re: Date Calculation Help

2007-06-30 Thread Oliver Jato
revDAVE wrote: > I have segmented a year into four quarters (3 months each) > > nowdate = the month of the chosen date (ex: 5-30-07 = month 5) > > Q: What is the best way to calculate which quarter (1-2-3 or 4) the > chosen date falls on? > > Result - Ex: 5-30-07 = month 5 and should fall in q

Re: [PHP] Re: date calculation

2003-02-16 Thread qt
No I am not using msql "Olinux" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > If you're using a database, it may be able to take > care of this for you. If you're using mysql: > > 6.3.4 Date and Time Functions > http://www.mysql.com/documentation/mysql/bychap

Re: [PHP] Re: date calculation

2003-02-16 Thread olinux
If you're using a database, it may be able to take care of this for you. If you're using mysql: 6.3.4 Date and Time Functions http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#Date_and_time_functions olinux --- Fred Merritt <[EMAIL PROTECTED]> wrote: > Qt, > The ea

[PHP] Re: date calculation

2003-02-16 Thread Fred Merritt
Qt, The easiest way is to convert your dates into a serial day number(i.e. the number of days that have elapsed between your date, and some arbitrary date in the dim and distant past - I think PHP uses 25th November, -4714). There are some calendar functions in php that will do this for you.