Date issue

This is a discussion on Date issue within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi, I am running MySQL 4.0.14 with PHP 5.1.4. I have a table where I'm ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-29-2006
Babanou
 
Posts: n/a
Default Date issue

Hi,
I am running MySQL 4.0.14 with PHP 5.1.4.
I have a table where I'm writing a timestamp field with the now() variable.

When I try to read it (formatted or not), I get a weird date output Year
1933 or 1907.

Any specific setting I'm missing to output my date properly?

Thx in advance.

K.


Reply With Quote
  #2 (permalink)  
Old 06-29-2006
-Lost
 
Posts: n/a
Default Re: Date issue

"Babanou" <mephisto66@yahoo.com> wrote in message
news:h%Fog.112328$8i2.579044@wagner.videotron.net. ..

NOW() returns the current date and time in a specific format. If you are attempting to
modify that format, that may be your problem.

-Lost


Reply With Quote
  #3 (permalink)  
Old 06-29-2006
Babanou
 
Posts: n/a
Default Re: Date issue

So there is absolutely no way to modify the format?

If I want to do so, what should I use?

Thx.



"-Lost" <spam_ninjaREMOVEME@REMOVEMEcomcast.net> wrote in message
news:K4OdnUTBXYf2qz7ZnZ2dnUVZ_vednZ2d@comcast.com. ..
> "Babanou" <mephisto66@yahoo.com> wrote in message
> news:h%Fog.112328$8i2.579044@wagner.videotron.net. ..
>
> NOW() returns the current date and time in a specific format. If you are
> attempting to modify that format, that may be your problem.
>
> -Lost
>



Reply With Quote
  #4 (permalink)  
Old 06-29-2006
Rik
 
Posts: n/a
Default Re: Date issue

Babanou wrote:
> So there is absolutely no way to modify the format?
>
> If I want to do so, what should I use?


I'd use UNIX_TIMESTAMP() in mysql_database, and take care of the formatting
in PHP using strftime().

Grtz,
--
Rik Wasmus


Reply With Quote
  #5 (permalink)  
Old 06-30-2006
Babanou
 
Posts: n/a
Default Re: Date issue

Great thx.
strtotime works...

..K.


"Rik" <luiheidsgoeroe@hotmail.com> wrote in message
news:25496$44a3c0cb$8259c69c$31314@news2.tudelft.n l...
> Babanou wrote:
>> So there is absolutely no way to modify the format?
>>
>> If I want to do so, what should I use?

>
> I'd use UNIX_TIMESTAMP() in mysql_database, and take care of the
> formatting
> in PHP using strftime().
>
> Grtz,
> --
> Rik Wasmus
>
>



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:42 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0