Check out strtotime in the PHP manual. It gives a few examples of how to
use the function that I think will answer your first question. Next, check
out mktime, time, and date.
> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Michael T. Peterson
> Sent: Tuesday, Au
On Tuesday 03 August 2004 14:05, Michael T. Peterson offered up the
following tid-bit of information :
> Evidently the strtotime() function will not convert an SQL datetime to a
> timestamp. Am I missing something? Here's an example of what I mean:
>
> $sql_datetime = '1948-30-03 01:30:00';
> $ts
Michael T. Peterson wrote:
Evidently the strtotime() function will not convert an SQL datetime to a
timestamp. Am I missing something? Here's an example of what I mean:
$sql_datetime = '1948-30-03 01:30:00';
$ts = strtotime( $sql_datetime );
print( $ts.'');
When this script is executed, strtotime()
On Wednesday 04 August 2004 02:05, Michael T. Peterson wrote:
> Evidently the strtotime() function will not convert an SQL datetime to a
> timestamp. Am I missing something? Here's an example of what I mean:
>
> $sql_datetime = '1948-30-03 01:30:00';
> $ts = strtotime( $sql_datetime );
> print( $ts
> Evidently the strtotime() function will not convert an SQL datetime to a
> timestamp. Am I missing something? Here's an example of what I mean:
>
> $sql_datetime = '1948-30-03 01:30:00';
> $ts = strtotime( $sql_datetime );
> print( $ts.'');
>
> When this script is executed, strtotime() returns -1
Try reversing the order in the date to -mm-dd and I believe it should
work.
Keep in mind that the time variable $ts is not the same as a Mysql timestamp
for example. It conforms to the unix epoch time variable.
Warren Vail
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On
6 matches
Mail list logo