adding leading zeros to a date
- From: "John Smith" <kevin4205@xxxxxxxxxxx>
- Date: Wed, 27 Apr 2005 09:57:07 -0700
I get three variables from an HTML form. $InDay, $InMonth, and $InYear.
$InDate = ($inyear . "-" . $inmonth . "-" . $inday);
This gives me a string named $InDate. Its value is:
2005-7-2
I want to have it changed to:
2005-07-02
How do I get php to add leading zeros to this date?
.
- Follow-Ups:
- Re: adding leading zeros to a date
- From: Andrew @ Rockface
- Re: adding leading zeros to a date
- Prev by Date: Re: PHP vs. Perl
- Next by Date: Re: adding leading zeros to a date
- Previous by thread: Cookies bug with IE
- Next by thread: Re: adding leading zeros to a date
- Index(es):
Relevant Pages
|