Re: Access 97 Dates
| From: | Stas Trefilov | Date: | Thu, 15 Jun 2000 12:54:55 +0000 |
| Subject: | Re: Access 97 Dates | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-472@lists.php.net to get a copy of this message | ||
Christopher Derr wrote:
>
> I'm accessing Access 97 via ODBC (as if there was another choice) and
> I'd like to format the dates it sends in some other way than its default
> 2000-06-12 10:38:26. A UNIX timestamp is the preferred method of
> course, and then format it using date() in PHP. But I can't seem to
> import it in any other method.
>
> Thanks for any help...and strtotime doesn't work on that format...:(
>
> Thanks,
>
> Chris
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
$str = "2000-06-12 10:38:26";
ereg ("([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})",
$str,
$res);
$timestamp = mktime ($res[4], $res[5], $res[6], $res[2], $res[3], $res[1]);
--
Stas Trefilov
Moscow Russia