Convert to date/time variable and perform arithmetic.
Otherwise, if these dates are from mysql, let mysql do it
-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:12 AM
To: [EMAIL PROTECTED]
Subject: [PHP] syntax for date math expressions
diff("2002-04-03","2002-04-02") as difference from realtable
Warren Vail
Tools, Metrics & Quality Processes
(415) 667-7814
Pager (877) 774-9891
215 Fremont 02-658
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:02 AM
On Wed, 3 Apr 2002, Rick Emery wrote:
> Convert to date/time variable and perform arithmetic.
> Otherwise, if these dates are from mysql, let mysql do it
Even if you don't happen to be getting the date out of MySQL, it can
occasionally be easier to let MySQL do your date math since it has some
ni
On Wednesday, April 3, 2002, at 03:58 PM, Miguel Cruz wrote:
> On Wed, 3 Apr 2002, Rick Emery wrote:
>> Convert to date/time variable and perform arithmetic.
>> Otherwise, if these dates are from mysql, let mysql do it
>
> Even if you don't happen to be getting the date out of MySQL, it can
> o
> I'd actually like to use MySQL's builtin date formats, but I like the
> timestamp that PHP uses (and I like what I can do with a timestamp in
> the date() function) so I have been using VARCHAR(20) to hold the date
> as a string. MySQL's TIMESTAMP is not the same thing as PHP's.
But you can si
On Wed, 3 Apr 2002, Erik Price wrote:
> On Wednesday, April 3, 2002, at 03:58 PM, Miguel Cruz wrote:
>> Even if you don't happen to be getting the date out of MySQL,
>> it can occasionally be easier to let MySQL do your date math since
>> it has some nice functions for it (DATE_ADD, DATE_SUB, etc
On Wednesday, April 3, 2002, at 04:14 PM, Rasmus Lerdorf wrote:
> But you can simply call MySQL's UNIX_TIMESTAMP() function on the mysql
> field when you select it if you want it into unix timestamp format.
For SELECTs, this is fine, but what happens when I want to insert a new
date? I trans
date()
On Wed, 3 Apr 2002, Erik Price wrote:
>
> On Wednesday, April 3, 2002, at 04:14 PM, Rasmus Lerdorf wrote:
>
> > But you can simply call MySQL's UNIX_TIMESTAMP() function on the mysql
> > field when you select it if you want it into unix timestamp format.
>
> For SELECTs, this is fine, bu
> as a string. MySQL's TIMESTAMP is not the same thing as PHP's.
Let me be the devil's layer here, Erik.
In order to achieve the best portability and to gain the best
performance you'd better use mySQL date field types to store the dates.
If you need the PHP timestamps you can simply use anoth
[EMAIL PROTECTED]]
> Sent: Wednesday, April 03, 2002 11:27 PM
> To: Rasmus Lerdorf
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] syntax for date math expressions
>
>
> On Wednesday, April 3, 2002, at 04:14 PM, Rasmus Lerdorf wrote:
>
> > But you can simply call MySQL'
Message-
> From: Erik Price [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 03, 2002 11:27 PM
> To: Rasmus Lerdorf
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] syntax for date math expressions
>
>
> On Wednesday, April 3, 2002, at 04:14 PM, Rasmus Lerdorf wrote
11 matches
Mail list logo