Raised This Month: $ Target: $400
 0% 

getting todays date


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 06-08-2010 , 10:18   getting todays date
Reply With Quote #1

Hey, how to get today date like: 2010-06-08.

I found this: http://www.amxmodx.org/funcwiki.php?go=func&id=605, but I don't know how to use it.

1 Question more, how can I save it to MySQL, like: ?

PHP Code:
SQL_PrepareQuery(SqlConnection,"UPDATE `user` SET `date`='%i' WHERE `ip`='%s'",dateszIp
reinert is offline
Owner123
Member
Join Date: Jun 2010
Old 06-08-2010 , 10:24   Re: getting todays date
Reply With Quote #2

PHP Code:
new CurrentTime[9
get_time("%Y-%m-%d",CurrentTime,8
This SQL save is correctly.
Owner123 is offline
FlyingHorse
Senior Member
Join Date: Apr 2010
Location: Under your bed.
Old 06-08-2010 , 10:32   Re: getting todays date
Reply With Quote #3

PHP Code:
#include <amxmodx>
#include <colorchat>

new PLUGIN[ ] = "Say date"
new VERSION[ ] = "1.0"
new AUTHOR[ ] = "FlyingHorse"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /date""setDate")
    
register_clcmd("say_team /date""setDate")
    
}

public 
setDate(id)
{
    new 
GetDate[9
    
get_time("%Y-%m-%d"GetDate8)  
    
ColorChat(idGREEN"^x01The current date is:^x04 %s"GetDate)


Last edited by FlyingHorse; 06-08-2010 at 10:34.
FlyingHorse is offline
Send a message via Skype™ to FlyingHorse
reinert
Veteran Member
Join Date: Feb 2007
Old 06-08-2010 , 10:34   Re: getting todays date
Reply With Quote #4

Thanks! hope it works. can't continue till This is not working, maybe someone can help me in other thread too ?
reinert is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-08-2010 , 19:46   Re: getting todays date
Reply With Quote #5

Quote:
Originally Posted by reinert View Post
Thanks! hope it works. can't continue till This is not working, maybe someone can help me in other thread too ?
It is not working so you can now continue. LOL.
__________________
fysiks is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 06-09-2010 , 00:16   Re: getting todays date
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
It is not working so you can now continue. LOL.
LOLOL'd.
__________________
Hi.
Kreation is offline
Reply



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 On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode