AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   transform seconds in date (https://forums.alliedmods.net/showthread.php?t=86431)

Iulyy 02-25-2009 14:42

transform seconds in date
 
What function is to transform a nr of seconds in date? And can you give me a example please? Thank you!

Exolent[jNr] 02-25-2009 15:30

Re: transform seconds in date
 
Moved to Scripting Help.

Iulyy 02-25-2009 15:40

Re: transform seconds in date
 
Sorry about that, it wasn't intentionally.

danielkza 02-25-2009 15:43

Re: transform seconds in date
 
http://www.amxmodx.org/funcwiki.php?go=func&id=250

Iulyy 02-25-2009 16:22

Re: transform seconds in date
 
Code:


format_time(date, 31, "%d.%m.%Y %H:%M:%S");

Already tryed, but i don't know for sure if is corectly, i tested and is the curent time wich i don't want that, i want to create the date with my own var off seconds.

danielkza 02-25-2009 16:27

Re: transform seconds in date
 
Quote:

Originally Posted by Iulyy (Post 769003)
Code:


format_time(date, 31, "%d.%m.%Y %H:%M:%S");

Already tryed, but i don't know for sure if is corectly, i tested and is the curent time wich i don't want that, i want to create the date with my own var off seconds.

You hate to pass your time as the last argument.

fysiks 02-25-2009 17:29

Re: transform seconds in date
 
Quote:

Originally Posted by Iulyy (Post 768930)
What function is to transform a nr of seconds in date? And can you give me a example please? Thank you!

nr?

Quote:

Originally Posted by danielkza (Post 769007)
You hate to pass your time as the last argument.

hate? (lol) :arrow: have

You mean the last argument is the "timestamp" (seconds from the unix epoch) like in php?

Iulyy 02-25-2009 17:30

Re: transform seconds in date
 
Thank you, i made it!

danielkza 02-25-2009 17:37

Re: transform seconds in date
 
Quote:

Originally Posted by fysiks (Post 769045)
nr?



hate? (lol) :arrow: have

You mean the last argument is the "timestamp" (seconds from the unix epoch) like in php?

Yep, correct.

And fixed typo :crab:


All times are GMT -4. The time now is 16:53.

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