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
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to