Greetings, Thodoris.
In reply to Your message dated Wednesday, October 8, 2008, 16:35:40,
Greetings to you too :-) .
From your function name I assume you want to use it in MySQL. In that
case, why don't you have MySQL do all the magic for you?
eg. INSERT INTO table (col) VALUES
On Oct 8, 2008, at 7:08 AM, Thodoris wrote:
I know that *strtotime*() only recognises the formats mm/dd/,
-mm-dd and mmdd
for numeric months but I need do something like that:
function dateWebToMysql($webdate){
$format = 'Y-m-d';
$timestamp = strtotime($webdate);
On 8 Oct 2008, at 12:58, Thodoris wrote:
Actually this means that strtotime() was made with Americans *only*
in mind... :-) .
As far as I know it uses the configured timezone to decide between
ambiguous formats.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
On Oct 8, 2008, at 7:58 AM, Thodoris wrote:
Actually strtotime accepts all kinds of things... Last week
Thursday midnight for example works perfectly.
You could do an explode on the field and then reorder the array
anyway that you want...
?PHP
$date = 13/01/2008;
$datearray =
Thodoris wrote:
Actually strtotime accepts all kinds of things... Last week
Thursday midnight for example works perfectly.
You could do an explode on the field and then reorder the array
anyway that you want...
?PHP
$date = 13/01/2008;
$datearray = explode(/, $date);
echo
From your function name I assume you want to use it in MySQL. In that
case, why don't you have MySQL do all the magic for you?
eg. INSERT INTO table (col) VALUES (FROM_UNIXTIME($timestamp));
(using FROM_UNIXTIME($timestamp) will give you the date-time in mysql
format (-MM-DD HH:MM:SS)
Actually strtotime accepts all kinds of things... Last week
Thursday midnight for example works perfectly.
You could do an explode on the field and then reorder the array
anyway that you want...
?PHP
$date = 13/01/2008;
$datearray = explode(/, $date);
echo $datearray[1] ./.
On Oct 8, 2008, at 7:08 AM, Thodoris wrote:
I know that *strtotime*() only recognises the formats mm/dd/,
-mm-dd and mmdd
for numeric months but I need do something like that:
function dateWebToMysql($webdate){
$format = 'Y-m-d';
$timestamp =
On Oct 8, 2008, at 7:24 AM, Thodoris wrote:
On Oct 8, 2008, at 7:08 AM, Thodoris wrote:
I know that *strtotime*() only recognises the formats mm/dd/,
-mm-dd and mmdd
for numeric months but I need do something like that:
function dateWebToMysql($webdate){
$format =
On Mon, 2002-02-04 at 13:40, toni baker wrote:
$date1 = 10/12/2002;
$date1 = date(D M j Y, strtotime($date1));
$date2 = date(D M j Y);
$date3 = date(D M j Y, $date1);
print $date1.br;
print $date2.br;
print $date3.br;
The code above gives me the following output:
Fri Oct 11 2002
toni,
$date1 = 10/12/2002;
$date1 = date(D M j Y, strtotime($date1));
$date2 = date(D M j Y);
$date3 = date(D M j Y, $date1);
print $date1.br;
print $date2.br;
print $date3.br;
The code above gives me the following output:
Fri Oct 11 2002
Mon Feb 4 2002
Wed Dec 31 1969
Is
On Tue, 2002-02-05 at 14:11, DL Neil wrote:
toni,
$date1 = 10/12/2002;
$date1 = date(D M j Y, strtotime($date1));
$date2 = date(D M j Y);
$date3 = date(D M j Y, $date1);
print $date1.br;
print $date2.br;
print $date3.br;
The code above gives me the following output:
Torben,
toni,
$date1 = 10/12/2002;
$date1 = date(D M j Y, strtotime($date1));
$date2 = date(D M j Y);
$date3 = date(D M j Y, $date1);
print $date1.br;
print $date2.br;
print $date3.br;
The code above gives me the following output:
Fri Oct 11 2002
Mon Feb 4
On Mon, 2002-02-04 at 15:05, DL Neil wrote:
Torben,
No offense, but in TFM (which you have of course R), follow the 'Date
Input Formats' link to:
http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html
You will find this sentence:
The construct 'month/day/year', popular
Torben,
No offense, but in TFM (which you have of course R), follow the 'Date
Input Formats' link to:
http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html
You will find this sentence:
The construct 'month/day/year', popular in the United States, is
15 matches
Mail list logo