RE: [PHP-DB] date to Y-M-D
ehmmm what kind of dates do you use, maybe dates of birth? when using date of unix timestamp you can't have dates befor 1970 so if those timestamps represents an older date you can't use timestamps! -mark- -Oorspronkelijk bericht- Van: David Rice [mailto:[EMAIL PROTECTED] Verzonden: Tuesday, March 25, 2003 3:42 PM Aan: [EMAIL PROTECTED] Onderwerp: [PHP-DB] date to Y-M-D a function to convert any date to ymd... function datetoymd($date){ $dateymd = date('Y-m-d',$date); return $dateymd; } this function when output gives me the date 1970-01-01 (date of the unix timestamp start) so, ehm, why!? cheers, dave _ Stay in touch with absent friends - get MSN Messenger http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] date to Y-M-D
> function datetoymd($date){ > $dateymd = date('Y-m-d',$date); > > return $dateymd; > } > > this function when output gives me the date 1970-01-01 (date of the unix > timestamp start) so, ehm, why!? Because you're not passing a valid Unix timestamp or whatever your passing is empty. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] date to Y-M-D
a function to convert any date to ymd... function datetoymd($date){ $dateymd = date('Y-m-d',$date); return $dateymd; } this function when output gives me the date 1970-01-01 (date of the unix timestamp start) so, ehm, why!? cheers, dave _ Stay in touch with absent friends - get MSN Messenger http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php