[HELP] date mysql saving format type -
Luca12 - 04.08.2014
Hello is there any way to save date when player disconnect in format like 13/07/2014? Thanks
Re: [HELP] date mysql saving format type -
sammp - 04.08.2014
Yes there is.
Use the TimeStampToDate include!
Re: [HELP] date mysql saving format type -
Luca12 - 05.08.2014
I try it but it didn't work . Thanks
Re: [HELP] date mysql saving format type -
Vince - 05.08.2014
Use Unix timestamps or a datetime field. I think it's fairly stupid to use a bloated Pawn function while all the functionality you could possibly ever need is built right into MySQL.
Re: [HELP] date mysql saving format type -
dirigent00 - 05.08.2014
Pack it as string. Try this:
Код:
new y, m, d, string[20];
getdate(y, m, d);
format(string, 20, "%02d/%02d/%04d", d, m, y);
Re: [HELP] date mysql saving format type -
Luca12 - 05.08.2014
can you maybe explain a little about datetime field can there put a format like 13/07/2014 or? I currently have unixtimestamp in column so it show me a date in format 2014-7-13 and then a time but I don't need that just date and if it possible in format above this text? Thanks
Re: [HELP] date mysql saving format type -
Vince - 05.08.2014
There are multiple built in function to convert date and time. A Unix timestamp saves both date and time in one normal integer variable. I think I've linked these article to you before;
http://dev.mysql.com/doc/refman/5.0/..._from-unixtime
http://dev.mysql.com/doc/refman/5.0/...on_date-format
I suggest you take a long look at these examples, because I can't really explain it better than they already did.
Re: [HELP] date mysql saving format type -
Luca12 - 05.08.2014
I don't understand so much there. How that is look in gamemode or it should be in gamemode I try few times but with no succes? Thaks
Re: [HELP] date mysql saving format type -
Gintaras123 - 05.08.2014
new Year, Month, Day;
getdate(Year, Month, Day);
new query[500],pNameg[24];
GetPlayerName(playerid,pNameg,sizeof(pNameg));
format(query,sizeof(query),"UPDATE `vartotojai` SET prisijungimas='%i-%i-%i' WHERE (`Vardas` = '%s')",Day,Month,Year,pNameg);
mysql_query(query);
Re: [HELP] date mysql saving format type -
Luca12 - 08.08.2014
I try that but it doesn't work. Thanks. Anyone else?