#native_company# #native_desc#
#native_cta#

mysql Timestamp(14) to .beat

By Dominik Nufer
on March 6, 2001

Version: 0.0.1

Type: Sample Code (HOWTO)

Category: Calendars/Dates

License: GNU General Public License

Description: simple code converts a mysql timestamp(14) to swatch .beat

if ( ereg( "([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})", $row["time"], $regs ) ) {
	$date= "$regs[3].$regs[2].$regs[1]";
	$time=floor(($regs[4]*60+$regs[5]+$regs[6]/60)/(24*60)*1000);
	if($time<100){
		$time="0".$time;
	}
}