Sorry about that. Works great with date. Thanks. "Matthew Weier O'Phinney" <matthew@xxxxxxxxxx> wrote in message news:slrncqssgk.dk3.matthew@xxxxxxxxxxxxxxxxxxxxxxx >* Christopher Weaver <booktues@xxxxxxxxx>: >> This code: >> >> echo strtotime("now"); >> echo mktime("Ymd", strtotime("now")); >> >> is producing this result: >> >> 1101945775 >> Warning: mktime(): Windows does not support negative values for this >> function ... >> -1 >> >> What am I doing wrong? > > Using the wrong function, or providing the wrong arguments. From the > arguments you're giving mktime, I suspect you actually want date(), > which would yield a string in the format 'YYYMMDD'. However, if you > really want to use mktime, you should be be using it as follows: > > int mktime ( [int $hour], [int $minute], [int $second], [int $month], > [int $day], [int $year], [int $is_dst] ) > > Please read the manual entries for the functions you're using before > posting to the list. > >> "John Holmes" <holmes072000@xxxxxxxxxxx> wrote in message >> news:41AD2DB7.4040501@xxxxxxxxxxxxxx >> > Christopher Weaver wrote: >> > > I've looked at the date functions in the manual but can't find what I >> > > need. All I want to do is add and subtract days without ending up >> > > with >> > > bogus date values. IOW, Nov. 29 + 7 days shouldn't be Nov. 36. >> > > >> > > Just a nod in the write direction would be great. >> > >> > mktime() or strtotime() > > -- > Matthew Weier O'Phinney | mailto:matthew@xxxxxxxxxx > Webmaster and IT Specialist | http://www.garden.org > National Gardening Association | http://www.kidsgardening.com > 802-863-5251 x156 | http://nationalgardenmonth.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php