PDA

View Full Version : FROM_UNIXTIME MyQL bug


GospodinX
04/06/2018, 04:40 PM
Hi guys

I want to convert timestamp to date format.I'm try with this:

mysql_tquery( g_SQL, "SELECT ImeEventa, BrojPokretanja,FROM_UNIXTIME(ZadnjiPokrenut, '%%d/%%m/%%Y %%H:%%i:%%s') as date FROM `event` ORDER BY `ID`", "LoadEvent", "i", playerid );

forward LoadEvent( playerid );
public LoadEvent( playerid )
{
new date[24];
cache_get_value_name(i, "date", date);
printf("%s",date);
return 1;
}


Result is:

%d/%m/%Y %H:%i:%s


When i try same thing in phpmyadmin(Sql query) i get good date format but it dont work in samp..I don't know what i'm doing wrong...

GospodinX
05/06/2018, 05:41 AM
Bump...