SA-MP Forums Archive
SQLite DATEDIFF ? - 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: SQLite DATEDIFF ? (/showthread.php?tid=323937)



SQLite DATEDIFF ? - Jefff - 07.03.2012

I want difference between two dates, how to calculate days between 2012-04-06 and 2012-03-07 ? I have no idea how to do this.


Re: SQLite DATEDIFF ? - Calgon - 07.03.2012

http://stackoverflow.com/questions/2...ates-in-sqlite

******?


Re: SQLite DATEDIFF ? - Jefff - 07.03.2012

There is no other way to do this without julianday? like strftime ?


Re: SQLite DATEDIFF ? - Campbell- - 07.03.2012

Quote:
Originally Posted by Jefff
Посмотреть сообщение
There is no other way to do this without julianday? like strftime ?
Well, the actually question you should answer is why you need it in another way and how that way should look like. I believe that there are several ways to handle this problem and the most common ways are shown above.


Re: SQLite DATEDIFF ? - Jefff - 07.03.2012

In julianday returns 29.5464645645 and I want only 29, I know, I can select only 29 but this is another work


Re: SQLite DATEDIFF ? - Campbell- - 07.03.2012

Quote:
Originally Posted by Jefff
Посмотреть сообщение
In julianday returns 29.5464645645 and I want only 29, I know, I can select only 29 but this is another work
https://sampwiki.blast.hk/wiki/Strfind

Search for the '.' and simply save the '29' in another variable. Then you're done.