FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to get the system date in PHP
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
How to get the system date in PHP [message #180627] Thu, 07 March 2013 13:35 Go to next message
Norah Jones is currently offline  Norah Jones
Messages: 1
Registered: March 2013
Karma: 0
Junior Member
No Message Body
Re: How to get the system date in PHP [message #180628 is a reply to message #180627] Thu, 07 March 2013 13:38 Go to previous messageGo to next message
Kevin Peterson is currently offline  Kevin Peterson
Messages: 2
Registered: March 2013
Karma: 0
Junior Member
On Thursday, March 7, 2013 7:05:02 PM UTC+5:30, Norah Jones wrote:
>

Try
echo 'Now: '. date('Y-m-d') ."\n";
Re: How to get the system date in PHP [message #180629 is a reply to message #180628] Thu, 07 March 2013 13:51 Go to previous messageGo to next message
Kevin Peterson is currently offline  Kevin Peterson
Messages: 2
Registered: March 2013
Karma: 0
Junior Member
On Thursday, March 7, 2013 7:08:25 PM UTC+5:30, Kevin Peterson wrote:
> On Thursday, March 7, 2013 7:05:02 PM UTC+5:30, Norah Jones wrote:
>
>>
>
>
>
> Try
>
> echo 'Now: '. date('Y-m-d') ."\n";

Try this also
<?php $mysqltime = date ("Y-m-d H:i:s", $phptime); ?>
Re: How to get the system date in PHP [message #180674 is a reply to message #180629] Sat, 09 March 2013 10:36 Go to previous messageGo to next message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma: 0
Senior Member
On 07-03-2013 14:51, Kevin Peterson wrote:
>
> Try this also
> <?php $mysqltime = date ("Y-m-d H:i:s", $phptime); ?>
>

PHP Notice: Undefined variable: phptime in Command line code on line 1
Re: How to get the system date in PHP [message #180678 is a reply to message #180674] Sat, 09 March 2013 15:24 Go to previous message
iarethebest is currently offline  iarethebest
Messages: 3
Registered: March 2013
Karma: 0
Junior Member
On Saturday, March 9, 2013 4:36:22 AM UTC-6, Luuk wrote:
> On 07-03-2013 14:51, Kevin Peterson wrote:
>
>>
>
>> Try this also
>
>> <?php $mysqltime = date ("Y-m-d H:i:s", $phptime); ?>
>
>>
>
>
>
> PHP Notice: Undefined variable: phptime in Command line code on line 1

I don't think I'm seeing all of the replies here (OP's message body is blank, and Kevin formatting it for MySQL seems completely random) but I'm pretty sure he meant:

<?php $mysqltime = date ("Y-m-d H:i:s", time()); ?>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Bowling
Next Topic: Does PHP have a way to pass form data to a remote script?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 21:54:53 GMT 2024

Total time taken to generate the page: 0.02408 seconds