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 :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
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 08:35 Go to next message
Norah Jones is currently offline  Norah Jones
Messages: 1
Registered: March 2013
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
No Message Body
Re: How to get the system date in PHP [message #180628 is a reply to message #180627] Thu, 07 March 2013 08:38 Go to previous messageGo to next message
Kevin Peterson is currently offline  Kevin Peterson
Messages: 2
Registered: March 2013
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 08:51 Go to previous messageGo to next message
Kevin Peterson is currently offline  Kevin Peterson
Messages: 2
Registered: March 2013
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 05:36 Go to previous messageGo to next message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 10:24 Go to previous message
iarethebest is currently offline  iarethebest
Messages: 3
Registered: March 2013
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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()); ?>
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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: Tue Oct 24 01:54:34 EDT 2017

Total time taken to generate the page: 0.00764 seconds