FROM_UNIXTIME MyQL bug - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: FROM_UNIXTIME MyQL bug (
/showthread.php?tid=654736)
FROM_UNIXTIME MyQL bug -
GospodinX - 04.06.2018
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:
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...
Re: FROM_UNIXTIME MyQL bug -
GospodinX - 05.06.2018
Bump...