Re: One more quickie
| From: | Edward van Bilderbeek - Bean IT | Date: | Sat, 09 Feb 2002 13:54:54 +0000 |
| Subject: | Re: One more quickie | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-84101@lists.php.net to get a copy of this message | ||
or:
SELECT LEFT(date, 7) as YearAndMonth FROM table;
Edward
----- Original Message -----
From: "val petruchek" <petruchek@zsu.zp.ua>
To: "PHP" <php-general@lists.php.net>
Sent: Saturday, February 09, 2002 2:28 PM
Subject: Re: [PHP] One more quickie
> > Don?t really want to bother you with these quickies - but:
> >
> > If i have a result from mysql that is a date (2002-02-09) - how do i
> change
> > that into a variable with only the first 7 characters (2002-02)?
> >
>
> SELECT year(data), month (data) from table;
>
> Valentin Petruchek (aki Zliy Pes)
> *** Cut the beginning ***
> http://zliypes.com.ua
> mailto:val@zliypes.com.ua
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>