Re: month part
| From: | Diana Castillo | Date: | Fri, 20 Dec 2002 09:23:32 +0000 |
| Subject: | Re: month part | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-92701@lists.php.net to get a copy of this message | ||
Hi everyone, I really wanted to validate if they put in a date , I ended up
doing it like this:
list($month, $day, $year) = sscanf($lastcontact,"%d/%d/%d");
if (checkdate($month,$day,$year)){it is a date}
"Antony Dovgal" <tony2001@ua.fm> escribió en el mensaje
news:20021219161401.1a2303ea.tony2001@ua.fm...
> On Thu, 19 Dec 2002 15:04:56 +0100
> "Diana Castillo" <diana.castillo@nvtechnologies.com> wrote:
>
> > How can I get a string containing the month part of a date the user
types
> > in?
> > e.g. if they type in "06/07/200" I want to get "06"
> Take a look to http://php.net/explode, String Functions and
> Date/Time
Functions.
> But you'd better write such questions to php-general@lists.php.net
>
> ---
> Wbr,
> Antony Dovgal aka tony2001 mailto:tony2001@ua.fm
> http://phpclub.net