[PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Andy B
i have the function i made: function CreateDate($day, $month, $year) { if(!empty($day) !empty($month) !empty($year)){ //convert $day, $month, and $year into a valid timestamp $time= strtotime($day, mktime(0,0,0,$month,1,$year)); $time=date(YmdHis, $time); return $time; } else { return false; }}

Re: [PHP] function CreateDate i made doesnt work?

2004-04-06 Thread John W. Holmes
From: Andy B [EMAIL PROTECTED] i have the function i made: function CreateDate($day, $month, $year) { if(!empty($day) !empty($month) !empty($year)){ //convert $day, $month, and $year into a valid timestamp $time= strtotime($day, mktime(0,0,0,$month,1,$year)); $time=date(YmdHis, $time);

Re: [PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Richard Davey
Hello Andy, Tuesday, April 6, 2004, 2:18:45 PM, you wrote: AB i have the function i made: AB function CreateDate($day, $month, $year) { AB if(!empty($day) !empty($month) !empty($year)){ AB //convert $day, $month, and $year into a valid timestamp AB $time= strtotime($day,

Re: [PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Shimi
by the way change ur if alittle.. change the to || John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] From: Andy B [EMAIL PROTECTED] i have the function i made: function CreateDate($day, $month, $year) { if(!empty($day) !empty($month) !empty($year)){ //convert

Re: [PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Red Wingate
I've seen this type of creating a timestamp quite often now and was even so often shaking my head about it. Guess i've seen it somewhere in the PHP Documentation's user contributed notes on day. Just google for the term and you will find many hits like this: http://www.mail-archive.com/[EMAIL

Re[2]: [PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Richard Davey
Hello Red, Tuesday, April 6, 2004, 3:40:07 PM, you wrote: RW I've seen this type of creating a timestamp quite often now and was even so RW often shaking my head about it. Guess i've seen it somewhere in the PHP RW Documentation's user contributed notes on day. Just google for the term and RW

[PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Andy B
Replace the above two lines with $time = date('YmdHis', mktime(0,0,0,$month,$day,$year); ok the function works now because when i echo the output of $_SESSION['add']['start_date'] it shows the right 14 digit timestamp for the date i wanted to create... now the problem is getting it to echo

Re: [PHP] function CreateDate i made doesnt work?

2004-04-06 Thread John W. Holmes
From: Andy B [EMAIL PROTECTED] Replace the above two lines with $time = date('YmdHis', mktime(0,0,0,$month,$day,$year); ok the function works now because when i echo the output of $_SESSION['add']['start_date'] it shows the right 14 digit timestamp for the date i wanted to create...

[PHP] [fixed][PHP] function CreateDate i made doesnt work?

2004-04-06 Thread Andy B
date() expects a UNIX timestamp. MMDDHHMMSS is NOT a UNIX timestamp. So, instead of converting the UNIX timestamp to MMDDHHMMSS in your function, why not leave it a UNIX timestamp? Then you can send it through date() whenever you want it formatted. yea...it works now...hmmm... dont know