Re: Date Converting

From: Date: Sun, 11 May 2003 04:12:37 +0000
Subject: Re: Date Converting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147184@lists.php.net to get a copy of this message
Hello Ken, Take a look at the strtotime function, it converts common time formats to Unix timestamps for you. $timestamp = strtotime('03/04/2003'); Jason KEN - 2mediaZone wrote: >Hello, I'm a beginner and trying to convert specific date format to UNIX >time stamp format. > >Let's say I have 03/04/2003 (mm/dd/yyyy). > >$date = "03/04/2003"; > >list ($month, $date, $year ) = explode('/', $date); > >$formatted_date = $month.$date.$year; > >And I need to make $formatted_date variable to UNIX time stamp format some >how. > > >Please advise if anyone knows about this. > > >Thanks. >Ken > > >

« previous php.general (#147184) next »