Re: [Q] Converting SQL Datetimes to timestamps
| From: | Michael T. Peterson | Date: | Wed, 04 Aug 2004 21:36:10 +0000 |
| Subject: | Re: [Q] Converting SQL Datetimes to timestamps | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-192754@lists.php.net to get a copy of this message | ||
Thanks, everyone. I appreciate this very much.
Cheers,
Michael
"Michael T. Peterson" <mtp1032@comcast.net> wrote in message
news:ceok3d$tv1$1@sea.gmane.org...
> 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.'<br>');
>
> When this script is executed, strtotime() returns -1.
>
> If true, that strtotime() is unable to convert SQL datetimes into
> timestamps, how are others accomplishing this?
>
> Cheers,
>
> Michael
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>