Raised This Month: $ Target: $400
 0% 

convert DATE


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 05-04-2011 , 23:29   convert DATE
Reply With Quote #1

i would by convert this date:

PHP Code:
02.05.2011    >>>    2.5.2011 
(Remove 0, of the day and month)

PHP Code:
new DATE[13];
new 
DAY[03],MONTH[03],YEAR[5];

    
get_time("%d",DAY,charsmax(DAY));
    
get_time("%m",MONTH,charsmax(MONTH));
    
get_time("%Y",YEAR,charsmax(YEAR))

    
replace_all(DAY,1,"0","")
    
replace_all(MONTH,1,"0","")

    
formatex(DATE,charsmax(DATE),"%s.%s.%s",DAY,MONTH,YEAR)
    
    
client_print(id,3,"[LOL] DATE: %s",DATE
This is Correct? Any bug? suggestions ?

Thanks
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 05-04-2011 at 23:31. Reason: Added client_print(id,3,"[LOL] DATE: %s",DATE)
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
 



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 04:28.


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