Convert date to timestamp
#4

Yea, It's possible. I did for myself somethink like this.

Registration Respone
Код:
e_Info[ playerid ][ RegisterDate ] = gettime();
Код:
Registered On: %s",  timestampToDate(e_Info[ playerid ][ RegisterDate ])
Код:
stock timestampToDate(datetime, style = 0) 
{
	new string[64];
	static tm<timestamp>;
	localtime(Time:datetime, timestamp);

	switch(style)
	{
	    case 0:	strftime(string, 64, "%d/%m/%Y - %X", timestamp);
	    case 1:	strftime(string, 64, "%d/%m/%Y", timestamp);
	}
	return String;
}
Result
Reply


Messages In This Thread
Convert date to timestamp - by BalkanEliteRP - 07.02.2018, 10:01
Re: Convert date to timestamp - by KayJ - 07.02.2018, 10:47
Re: Convert date to timestamp - by zMason - 07.02.2018, 11:01
Re: Convert date to timestamp - by Bolex_ - 07.02.2018, 11:03
Re: Convert date to timestamp - by BalkanEliteRP - 07.02.2018, 11:33
Re: Convert date to timestamp - by Bolex_ - 07.02.2018, 11:47
Re: Convert date to timestamp - by BalkanEliteRP - 07.02.2018, 12:03
Re: Convert date to timestamp - by NaS - 07.02.2018, 12:23
Re: Convert date to timestamp - by BalkanEliteRP - 07.02.2018, 13:09
Re: Convert date to timestamp - by Gammix - 07.02.2018, 14:07

Forum Jump:


Users browsing this thread: 3 Guest(s)