Re: RE: Reading MS Access date/time field in PHP
| From: | Jason Wong | Date: | Sun, 15 Feb 2004 19:51:50 +0000 |
| Subject: | Re: RE: Reading MS Access date/time field in PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177742@lists.php.net to get a copy of this message | ||
On Monday 16 February 2004 00:37, YC Nyon wrote:
> I'm trying to extract the year for a query from a date/time field in MS
> Access via PHP.
What you have above and what you have below are different ...
> I want to create a query based on the year only. I could do it with some
> string functions. However, fundamentally, it's not correct.
> Anyone can help?
... for the latter have a look at the Date/Time functions that Access
provides. For the former, you're saying that:
> Viewing it in PHP without formating "2003-12-31 00:00:00"
It is a format that should be directly usable by strtotime(). Then look at the
other functions in the chapter "Date and Time functions" to find what you
need to extract the year.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
"How to make a million dollars: First, get a million dollars."
-- Steve Martin
*/