you could use explode() function of PHP:
$date = 'MM/DD/';
$date_a = explode('/', $date);
$mm = $date_a[0];
$dd = $date_a[1];
$ = $date_a[2];
$date = "$mm/".($dd+$n)."/$";
So here you have your date + something else ...
of course your exaple is smarter since in here I could manage t
try using
strtotime()
http://www.php.net/manual/en/function.strtotime.php
hope that helps
best regards
Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India
- Original Message -
From: "Don" <[EMAIL PROTECTED]>
To: "php list" <[EMAIL PROTECTED]>
Sent: Wednesday, February 14, 200
> Sorry if I am confused by the date functions in the manual but I am.
> Here's what I want to do:
> I have a string in the form MM/DD/. I wish to:
> 1) convert it to a date
> 2) add $n days to it
> 3) convert back to a string in the same format above
> I believe I can accomplish [2] and [3]
3 matches
Mail list logo