MySQL (BlueG) Subtract 2 Dates - 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: MySQL (BlueG) Subtract 2 Dates (
/showthread.php?tid=442064)
MySQL (BlueG) Subtract 2 Dates -
Swimor - 05.06.2013
MySQL (BlueG) Subtract 2 Dates
Hello,
In the DataBase I storing registration date in DateTime field.
I want to check the amount of days passed from registration, simply Subtract 2 Dates.
What the type of variable I must to use to do this one?
Thanks!
Re: MySQL (BlueG) Subtract 2 Dates -
Scenario - 05.06.2013
Use an INT field type and store a timestamp (using gettime() in PAWN). There are functions around here that can take two timestamps and determine how many days are between them...
Re: MySQL (BlueG) Subtract 2 Dates -
Swimor - 05.06.2013
Quote:
Originally Posted by RealCop228
Use an INT field type and store a timestamp (using gettime() in PAWN). There are functions around here that can take two timestamps and determine how many days are between them...
|
Can you give me the functions?