i'm new to sqlite... and relatively new to php. just wondering what the best
way is to store and compare dates.
right now i have something like this in my php code:
$curr_date_time = strftime('%Y-%m-%d %H:%M:%S');
i'm inserting this into a field in the database that has been defined as
can you point me in the right direction?
aka. what data type am i using to store the date in my sqlite database? is
TEXT correct?
how do I do a select on it?
thanks.
Stephan Beal-3 wrote:
On Mon, Jan 23, 2012 at 6:51 PM, dotolee woo_ju...@yahoo.com wrote:
i'm new to sqlite
hi there.
can someone tell me what i'm doing wrong? I'm using mktime() to save current
date / time stamp into my database as an INT.
then when i'm displaying the data, i use the date() function to format it.
here's how i create my time stamp variable in php:
$curr_time_stamp = mktime();
the month.
echo date(M-d-Y H:m:s, mktime());
i've read http://www.sqlite.org/lang_datefunc.html but i can't seem to get
it to work.
Simon Slavin-3 wrote:
On 23 Jan 2012, at 5:53pm, Stephan Beal wrote:
On Mon, Jan 23, 2012 at 6:51 PM, dotolee woo_ju...@yahoo.com wrote:
i'm new
i think i got it.
echo date(M-d-Y H:i:s, mktime());
date() is php.
thanks.
dotolee wrote:
i'm storing as integers now in the database.
getting the unix time in seconds using the mktime() method.
now i just need to figure out how to display properly.
for example, in the sample